Language + ? = BFF
-
In the desktop/Win32 development I would agree. But in the web development List is making laps around any other generics type, or any other object.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
That's due to poor developer skills, not because lists are superior.
-
C *
C++ *
C# .
Java a large mug and lots of sugarEdit
BASIC LET
These days "." has mutated to "=>". And not in a good way. Like it's been infected with Prolog, or F# or something.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
That's due to poor developer skills, not because lists are superior.
There is that too but is not always the case. Some Microsoft technologies/concepts are giving you no choice. EF and MVC come to mind.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
vector
for C++ just isn't the right choice, and indicates you are using C++ like C.virtual
andtemplate
are both far better choices. Depending upon how you use the language, both of them can be supported with valid arguments, so I don't think either of them can be realistically picked over the other. If you don't understandvirtual
, see the C++ tutorial in my sig. If you don't understandtemplate
, just see any of honey the codewitch's work. C++ becomes magic.Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver
-
There is that too but is not always the case. Some Microsoft technologies/concepts are giving you no choice. EF and MVC come to mind.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
Which just adds strength to my statement.
-
What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
My favorite .NET data structure is
Dictionary<_T_>
hands down. I always found the C++ equivalents (STL'smap
and MFC'sCMap
) somewhat klunkier, mostly because of the template usage and resultant inscrutable compiler diagnostics.Software Zen:
delete this;
-
vector
for C++ just isn't the right choice, and indicates you are using C++ like C.virtual
andtemplate
are both far better choices. Depending upon how you use the language, both of them can be supported with valid arguments, so I don't think either of them can be realistically picked over the other. If you don't understandvirtual
, see the C++ tutorial in my sig. If you don't understandtemplate
, just see any of honey the codewitch's work. C++ becomes magic.Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver
I wouldn't associate C++ with "virtual". Sure, it's a big part of the language concept, but not defines it. "Virtual" better fits with Java where everything is "virtual" by default. As for the templates, even C++ doesn't fully understand templates - at least until runtime. :) If you don't understand what I mean, think of separate template implementation and declaration. I know it's doable, but it doesn't feel natural.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
C *
C++ *
C# .
Java a large mug and lots of sugarEdit
BASIC LET
-
My favorite .NET data structure is
Dictionary<_T_>
hands down. I always found the C++ equivalents (STL'smap
and MFC'sCMap
) somewhat klunkier, mostly because of the template usage and resultant inscrutable compiler diagnostics.Software Zen:
delete this;
Yes, Dictionary is verry powerful when you search by key as it gives you O (log N) search, no duplications, ets. But if we go this path then DataTable is even more interesting. I also don't like how you can shoot yourself in the leg with the STL map. One assignment with missing reference operator and you are working with old data/copy.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
I wouldn't associate C++ with "virtual". Sure, it's a big part of the language concept, but not defines it. "Virtual" better fits with Java where everything is "virtual" by default. As for the templates, even C++ doesn't fully understand templates - at least until runtime. :) If you don't understand what I mean, think of separate template implementation and declaration. I know it's doable, but it doesn't feel natural.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
So the word you are looking for is
class
. Notvector
. :doh:Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver
-
No generics in v1. System.String is dreadful, the unavoidability of immutability is a very short-sighted (ivory tower) idea. They had to include StringBuilder just to make things work. It would be better for strings to be mutable by default and then be able to set them as immutable later as needed --
mystring.AsReadOnly()
ormystring.ReadOnly = true
Bleah, ptui. :mad:And no vector in C++ V1 either ... languages improve! :laugh: But string isn't too bad - it's not perfect, but it is way, way better than the char* / const char * mess that preceded it.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
So the word you are looking for is
class
. Notvector
. :doh:Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver
Again, not verry C++ specific. Same for structures.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
Again, not verry C++ specific. Same for structures.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
Quote:
What single structure or specific operator better defines a given language?
That was your question.
template
,virtual
, andclass
are all better answers thanvector
. In fact,vector
is an idiotic answer to that specific question. Especially sincevector
isn't a structure or operator. :doh: :doh: :doh: Of course, neither are the items I've given, but they do define the language.Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver
-
What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
And no vector in C++ V1 either ... languages improve! :laugh: But string isn't too bad - it's not perfect, but it is way, way better than the char* / const char * mess that preceded it.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
OriginalGriff wrote:
languages improve
Then it's not the same language.
-
Yes, Dictionary is verry powerful when you search by key as it gives you O (log N) search, no duplications, ets. But if we go this path then DataTable is even more interesting. I also don't like how you can shoot yourself in the leg with the STL map. One assignment with missing reference operator and you are working with old data/copy.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
Python: a tab and three spaces just to annoy people.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
How big is the tab? Like a bar tab?
-
My favorite .NET data structure is
Dictionary<_T_>
hands down. I always found the C++ equivalents (STL'smap
and MFC'sCMap
) somewhat klunkier, mostly because of the template usage and resultant inscrutable compiler diagnostics.Software Zen:
delete this;
enum
s are also way better in .net languages. -
What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
Javascript - "undefined". :-)
-
What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
C++ for me would be
template
I don't really use the STL that much due to working with tiny amounts of RAM.To err is human. Fortune favors the monsters.