VB haters, look away
-
Perhaps Delphi should be mentioned here ... [Anders Hejlsberg - Wikipedia](https://en.wikipedia.org/wiki/Anders\_Hejlsberg) Regards,
-
There we go. The index values range from 0 to (n-1), as they should. Now at which point did they start with 1? Every early home computer had a BASIC interpreter in a ROM, which in most cases was a customized Microsoft BASIC. Atari developed the BASIC from scratch, and was zero based. Look here.[^] It has been some time since I used that manual, but I should still have it somewhere. :-)
-
Arrays start at 1 - just like when counting your fingers. C# (C, C++...) messed up, who counts anything from zero? It's unnatural, zero simply does not exist.
Sin tack the any key okay
I would tell you what the zeroth. finger is, but, I don't think you are ready, yet.
«Differences between Big-Endians, who broke eggs at the larger end, and Little-Endians gave rise to six rebellions: one Emperor lost his life, another his crown. The Lilliputian religion says an egg should be broken on the convenient end, which is now interpreted by the Lilliputians as the smaller end. Big-Endians gained favor in Blefuscu.» J. Swift, 'Gulliver's Travels,' 1726CE
-
Perhaps Delphi should be mentioned here ... [Anders Hejlsberg - Wikipedia](https://en.wikipedia.org/wiki/Anders\_Hejlsberg) Regards,
Applause ! Finally Delphi is mentioned. And, can we not give Anders, Mads, Eric L., Eric T., and others, some credit for bring geniuses who created something remarkable ?
«Differences between Big-Endians, who broke eggs at the larger end, and Little-Endians gave rise to six rebellions: one Emperor lost his life, another his crown. The Lilliputian religion says an egg should be broken on the convenient end, which is now interpreted by the Lilliputians as the smaller end. Big-Endians gained favor in Blefuscu.» J. Swift, 'Gulliver's Travels,' 1726CE
-
Was happy that they finally updated the switch in C# to have be as flexible as the Visual Basic Select Case. Waited a long time for that one.
One of the "beauties" of the stock C# switch statement was that using integer case qualifiers it compiled to a mean and lean jump-table in CIL. I assume it still does; have yet to see any performance comparisons of use of the new features and other techniques for switch-a-roo. I like the new features.
«Differences between Big-Endians, who broke eggs at the larger end, and Little-Endians gave rise to six rebellions: one Emperor lost his life, another his crown. The Lilliputian religion says an egg should be broken on the convenient end, which is now interpreted by the Lilliputians as the smaller end. Big-Endians gained favor in Blefuscu.» J. Swift, 'Gulliver's Travels,' 1726CE
-
Yeah, but the point is, it was based on Java. Way more than VB. I think that book author is just biased. I don't have citations, but I always heard that even MS hired some top Java guys to help with the initial design of C#. As much as we love to hate Java, we still have it thank for what we use.
Jeremy Falcon
[Anders Hejlsberg - Wikipedia](https://en.wikipedia.org/wiki/Anders\_Hejlsberg) - he didn't work for Sun but he worked on Microsoft's J++ language.
Quote:
In 1996, Hejlsberg left Borland and joined Microsoft. One of his first achievements was the J++ programming language and the Windows Foundation Classes; he also became a Microsoft Distinguished Engineer and Technical Fellow. Since 2000, he has been the lead architect of the team developing the C# language. In 2012 Hejlsberg announced his new project, TypeScript, a superset of JavaScript.
Now is it bad enough that you let somebody else kick your butts without you trying to do it to each other? Now if we're all talking about the same man, and I think we are... it appears he's got a rather growing collection of our bikes.
-
Yeah, but the point is, it was based on Java. Way more than VB. I think that book author is just biased. I don't have citations, but I always heard that even MS hired some top Java guys to help with the initial design of C#. As much as we love to hate Java, we still have it thank for what we use.
Jeremy Falcon
Is it worthwile to distinguish between "Based on Java" and "Based on experience with Java"? It seems to me (own thoughts - no Wikipedia URL) that the C# designers sure made a thorough study of how Java served in practice, not just the formal language definition. Seeing how it was used, how the compiler handled it, how well the bytecode/VM idea worked in practice, made them go back to the drawing board, saying "OK, Java did it their way - some of it was successful, some of it was not. Now let us redo it in a way we believe will get at higher fraction of 'successful' elements." - Of course they did the same study of C++. Whether you will call it "based on" or "based on experience with" may be a matter of taste, but to me, the former alternative suggests much more of "a further development of ...", which C# certainly is not from Java.
-
[Visual J++ - Wikipedia](https://en.wikipedia.org/wiki/Visual\_J%2B%2B)
Quote:
Microsoft later developed the C# ("C Sharp") language as the primary language for the .NET platform, which was in many ways influenced by Java; subsequently the .NET Framework shares many ideas in common with Java. Much like Java, C# is compiled to a type of bytecode (called CIL), and runs on top of a virtual machine called the Common Language Runtime in .NET. Visual Studio 2005 was the last release to include J#.
Now is it bad enough that you let somebody else kick your butts without you trying to do it to each other? Now if we're all talking about the same man, and I think we are... it appears he's got a rather growing collection of our bikes.
-
Arrays start at 1 - just like when counting your fingers. C# (C, C++...) messed up, who counts anything from zero? It's unnatural, zero simply does not exist.
Sin tack the any key okay
To me, as a mathmatically inclined person, it really hurts taking the elevator in our new office building down to the basement: It goes: 4, 3, 2, 1, -1 ...!!! HEY! You dropped something! There is supposed to be something in between there! I am equally upset about Christian churches - I don't know if it applies to all, but at least the Protestants in Europe and the Catholics officcialy number years "..., -2 (i.e 2BC), -1, +1, +2...). There are years before Christ and years after Christ, but no year "of Christ", i.e. the year of of his birth. This hurts my mathematical feelings.
-
Was happy that they finally updated the switch in C# to have be as flexible as the Visual Basic Select Case. Waited a long time for that one.
Why didn't they make it multivariable as well, like in CHILL? switch (a, b, c) { (1, 'a', 4.3): ...code; (2, 'A', 0.0): ...code; (2, ELSE, pi): ...code; (3, 'C', *): ...code; ELSE: ...code; } * for a value means "don't care". ELSE for a value means "any value not used in any other switch alternative for this variable. Yes, you CAN make it very messy if you exploit the flexibility for all that it is worth. But a diciplined use can be far more readable than a 20-way switch, each alternative with a 7-15 way (varying among the 20) switch, each of those again with a 2-15 way (varying) switch. Then I'd rather prefer the single, clean, 3-dimensional switch.
-
I'm reading a C# book that was recommended on here recently and found this gem in the beginning.
Quote:
The truth of the matter is that many of C#’s syntactic constructs are modeled after various aspects of Visual Basic (VB) and C++. TROELSEN, ANDREW; Japikse, Philip. C# 6.0 and the .NET 4.6 Framework (Kindle Locations 3123-3124). Apress. Kindle Edition.
:-\
There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.
-
Medical fact - quitting VB now will greatly increase your lifespan. No citations needed. :-D
Medical fact: Case sensitive languages that also require semicolons at the end of every line and do not know the difference between a functions and a property unless you add () to the end of a parameter-less function drives you crazy within hours. But seriously. I do not understand the rant against *any* language. Especially when it comes to VB.net and C#; they are almost the same languages. See: C# and VB.NET Comparison Cheat Sheet: ASP Alliance[^] I think people can build crappy software and good software in any language. ;P
-
I must say that a statement that says "C# is compiled to a type of bytecode (called CIL)" (my emphasis) makes me somewhat sceptical to the competence of the writer. I doubt very much that (s)he has implemented very many compilers :-)
Those who can, do.. those that can't, teach.. those that can't teach write Wikipedia articles :)
Now is it bad enough that you let somebody else kick your butts without you trying to do it to each other? Now if we're all talking about the same man, and I think we are... it appears he's got a rather growing collection of our bikes.
-
Medical fact: Case sensitive languages that also require semicolons at the end of every line and do not know the difference between a functions and a property unless you add () to the end of a parameter-less function drives you crazy within hours. But seriously. I do not understand the rant against *any* language. Especially when it comes to VB.net and C#; they are almost the same languages. See: C# and VB.NET Comparison Cheat Sheet: ASP Alliance[^] I think people can build crappy software and good software in any language. ;P
I really don't like those feature-vs-feature, mechanism-vs-mechanism, xxyzzy-vs-xyzzy style of comparisons. Looking at each single feature / mechanism / xyzzy in isolation tends to hide their intended use, or established use. It reveals nothing about the "ecosystem" around the language. It allows a Fortran programmer to program Fortran in any language, arguing that (s)he is just using the mechanism provided by the language in a perfectly correct way. Reducing the differences between two languages to mere syntax details can actually be very misleading.
-
I must say that a statement that says "C# is compiled to a type of bytecode (called CIL)" (my emphasis) makes me somewhat sceptical to the competence of the writer. I doubt very much that (s)he has implemented very many compilers :-)
Can you elaborate? I have to say that I agree. Isn't the .NET CLI a type of bytecode?
-
I really don't like those feature-vs-feature, mechanism-vs-mechanism, xxyzzy-vs-xyzzy style of comparisons. Looking at each single feature / mechanism / xyzzy in isolation tends to hide their intended use, or established use. It reveals nothing about the "ecosystem" around the language. It allows a Fortran programmer to program Fortran in any language, arguing that (s)he is just using the mechanism provided by the language in a perfectly correct way. Reducing the differences between two languages to mere syntax details can actually be very misleading.
-
Can you elaborate? I have to say that I agree. Isn't the .NET CLI a type of bytecode?
I haven't been working with compilers for a number of years, so maybe there are younger species out there that do things in a different way - I know the "classical" way of doing it, believing that today's compilers are roughly the same: First, you break the source text into tokens. Then you try to identify structures in the sequence of tokens so that you can form a tree of hiearchical groups representing e.g. functions at some intermediate level, statements at a lower level, terms of a mathematical expression even further down. The term DAG - Directed Acyclic Graph - is commonly used for the parse tree. Nodes in the DAG commonly consist of 3-tuples or 4-tuples in a more or less common format for all nodes: Some semantic / operation code, two or three operands, or whatever else the compiler writer finds necessary. Many kinds of optimisation is done by restructuring the DAG: Recognizing identical sub-trees (e.g. common subexpressions) that need to be done only once, identifying statements that within a loop will have identical effect in every iteration so that sub-tree can be moved out of the loop, etc. etc. Unreachable code is pruned off the DAG. All such operations are done on an abstract level - a variable X is treated as X without regard to its location in memory, number of bits (unless the language makes special requirements) etc. etc. The DAG is completely independent of the word length, byte ordering, 1- or 2-complement arithmetic, register ID or field structure of the instruction code of any specific machine architecture. You may think of variables and locations as sort of still in a "symbolic" form (lots of symbolic labels where never visible in the source code, so this certainly is "sort of"). Once you have done all the restructuring of the DAG that you care for, you may traverse the tree's leaf node to generate the actual machine instructions. (This part of the compiler is commonly called the "back end".) Now you assign memory addresses, use of registers, choose the fastest sequence of machine instructions for that specific machine. You can still do some optimization, e.g. keeping values in registers (now that you know which registers you've got), but it is essentially very local. The DAG indicates which sub-trees are semantically independent of each other, so that you may reorder them, run them in parallell, or e.g. assemble six independent multiplication operations into one vector multiply if your CPU allows. All internal symbolic rerferences can be peeled off; the only symbols retained are exte
-
Guilty. I once dropped the guts of a Fortran program into C#. Worked pretty good. Easier than building an interface in Fortran.
I once worked on a machine whose operating system was written in Fortran! Rumours are that when Nic Wirth were developing the very first Pascal compiler, they started out writing a bootstrap in Fortran. Or, they tried, before realizing that it was easier do do it in assembly code. Another sidetrack: I also worked a littel in a language whose compiler was written in itself, but without using a bootstrap. The compiler author (and language designer) wrote the compiler code "offline", and line-by-line mentally translated the code line into the machine instructions he knew that the compiler would have generated, typing the assebly instructions into the machine and assembled it. You could say that is having a bootstrap in assembly, but it wasn't a simple bootstrap - it was the complete compiler.
-
I once worked on a machine whose operating system was written in Fortran! Rumours are that when Nic Wirth were developing the very first Pascal compiler, they started out writing a bootstrap in Fortran. Or, they tried, before realizing that it was easier do do it in assembly code. Another sidetrack: I also worked a littel in a language whose compiler was written in itself, but without using a bootstrap. The compiler author (and language designer) wrote the compiler code "offline", and line-by-line mentally translated the code line into the machine instructions he knew that the compiler would have generated, typing the assebly instructions into the machine and assembled it. You could say that is having a bootstrap in assembly, but it wasn't a simple bootstrap - it was the complete compiler.
-
[Anders Hejlsberg - Wikipedia](https://en.wikipedia.org/wiki/Anders\_Hejlsberg) - he didn't work for Sun but he worked on Microsoft's J++ language.
Quote:
In 1996, Hejlsberg left Borland and joined Microsoft. One of his first achievements was the J++ programming language and the Windows Foundation Classes; he also became a Microsoft Distinguished Engineer and Technical Fellow. Since 2000, he has been the lead architect of the team developing the C# language. In 2012 Hejlsberg announced his new project, TypeScript, a superset of JavaScript.
Now is it bad enough that you let somebody else kick your butts without you trying to do it to each other? Now if we're all talking about the same man, and I think we are... it appears he's got a rather growing collection of our bikes.
And this move KILLED Borland. Anders was the key behind Delphi, which I still use and enjoy. He made Delphi and C++ Builder produce interchangeable object files (compile in one, use in the other), which also helped him with C# and VB. Same trick. I used to have a Quick XXX and a Turbo XXX of just about everything back in the day. $99.00 bought you a lot! Dang I feel old...