Regarding the survey: What's your least favourite of these languages to code in?
-
I get the joke but why not ≔ Seriously now, I think it's a shame the only thing that hasn't changed in 40+ years of programming is the keyboard. We are stuck to the same limited set of characters that our ancestors put on a typewriter. Oops! seems I'm ranting again :laugh:
Mircea
-
Quote:
Btw. I don't get it....
Piebald, jokingly, came up with the idea of ∴ (the math sign for "therefore" used in logical proofs) instead of the assignment operator. I proposed (half jokingly) to use ≔ (U+2254), the colon equal sign used by Algol, Pascal and a few other languages.
Mircea
I like things to come in logical order, so my favorite is =: A + B =: C, or "Add A and B. Then store it in C" is far better than C := A + B: "Assign to C ... just wait a second, I have to calculate it first ... Add A and B. I hope you remember what we were going to do with it, as we said a while ago before we started calculating the expression ..." I programmed for a few years in a proprietary language using =:, and came to love it. It also had a half-swap operator: As in many languages, you could carry the result value assigned to C on, so the same value can be assigned to D and E: A+B =: C =: D =: E. Using :=: the old value of C was carried on. So you could e.g. link in a new element at the head of the list by NewElt =: Head :=: NewElt.Next. This comes far more natural when you read the code left to right, rather than skipping back and forth, as you have to when starting the statement with what you will be doing last.
-
Mircea Neacsu wrote:
We are stuck to the same limited set of characters that our ancestors put on a typewriter.
Try APL.
APL is the exception that proves the rule. The one language that wanted to break the mold and do things differently has a following of... sorry can't see anybody around here :) Together with LISP and FORTH, APL proves that revolutionary concepts gain very little traction among lemmings (sorry, I mean no disrespect for the rodents).
Mircea
-
I would vote for
:=
, I used Pascal a bit back in the day.Mircea Neacsu wrote:
limited set of characters that our ancestors put on a typewriter
Yet several languages allow Unicode now. Oh, and don't forget C's trigraphs. :rolleyes:
Don't expect the compiler to interpret the Unicode symbols identically with the digraphs and trigraphs, though. Not even the monographs, such as × for multiplication. I never tested out the limits for legality of unicode characters in e.g. C#. Even 7-bit ISO 646 ("ASCII", for those across the pond) has characters not legal in identifiers. Which characters in the full Unicode set are allowed in identifiers? Checking it out by trial and error takes more time than I am willing to spend!
-
APL is the exception that proves the rule. The one language that wanted to break the mold and do things differently has a following of... sorry can't see anybody around here :) Together with LISP and FORTH, APL proves that revolutionary concepts gain very little traction among lemmings (sorry, I mean no disrespect for the rodents).
Mircea
Mircea Neacsu wrote:
sorry can't see anybody around here
You can count me as one. I don't have any task where I can use it for some "serious" purpose, but it was fun to play around with. At the moment, I don't have an APL interpreter available (except for one running under DOS, but that's not the thing for me). Buying a commercial one is too expensive for a play toy. And APLs of today have experienced the same feature creep as most other languages, making it a far more messy language than the pure APL I learned in my youth.
-
I like things to come in logical order, so my favorite is =: A + B =: C, or "Add A and B. Then store it in C" is far better than C := A + B: "Assign to C ... just wait a second, I have to calculate it first ... Add A and B. I hope you remember what we were going to do with it, as we said a while ago before we started calculating the expression ..." I programmed for a few years in a proprietary language using =:, and came to love it. It also had a half-swap operator: As in many languages, you could carry the result value assigned to C on, so the same value can be assigned to D and E: A+B =: C =: D =: E. Using :=: the old value of C was carried on. So you could e.g. link in a new element at the head of the list by NewElt =: Head :=: NewElt.Next. This comes far more natural when you read the code left to right, rather than skipping back and forth, as you have to when starting the statement with what you will be doing last.
Interesting! I've never seen those operators in a general use language but I can see their use. The closest thing I've seen to your =: operator was the verbose:
ADD a TO B GIVING c
As a side note, only the ≕ (U+2255) is currently included in the Unicode standard.
Mircea
-
Java didn't invent GC. Lots of other languages have it. Including C#. The fact that Java and C# have a common feature does not prove that C# copied it from Java. Those who know the two GC implementations, and others as well, may identify specific elements in the C# GC handling that was pioneered in Java and not generally known in other GC mechanisms. That is (or might be) copying. But not the basic concept of GC.
I wasn't making a statement about which language was the first to have GC.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing. -
I thought Java and C# were mutual wannabes, he says, donning his asbestos suit. :-D
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.When I was reading the first spec for C# -- circa 1999 -- someone asked me, "isn't that the new Microsoft Java?" I have zero knowledge of Java, but C# is the bee's knees.
-
On the other hand... allowing the developer to format his code as he likes is better than requiring the developer to format his code a certain way. For the most part, C-like languages don't even require line breaks, which makes code generation much easier.
PIEBALDconsult wrote:
For the most part, C-like languages don't even require line breaks, which makes code generation much easier.
I believe they do so in an implicit way by imposing lengths on a line. I used the following in google to find some references.
cfront maximum line length
c# maximum line lengthI suspect this is essential because the compilers I have seen work on lines and not streams. I have seen a C++ compiler fail because a method was too long (generated code.) Java also imposes an explicit byte code limit on a method. Not sure about line limit but there are other limitations in the java classes which likely would limit the (realistic) size of the generated class file so I suspect there is some limit there also.
-
MarkTJohnson wrote:
require a single space
Won't a TAB or other whitespace suffice?
If you want to completely tick off your coworkers.
String fred
= "The text";Bah! Too much work to make really ugly code.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.