Scientist Proposes a New Programming Language For Teaching Coding (and Python) (github.com) 160
Long-time Slashdot reader theodp tells us Netherlands-based scientist Felienne Hermans shared a radical idea at the 2020 ACM International Computing Education Research Conference for a new programming language to be used for teaching coding -- and for teaching Python:
Hermans — an associate professor at the Leiden Institute of Advanced Computer Science — observes In her ICER presentation on Hedy that we don't overwhelm children who are beginning to learn to read with the messy rules of capitalization, punctuation, and sentence construction. So why do we think kids unfamiliar with programming concepts will be able to deal from the get-go with the chock-full-of-syntax-challenges presented by even a "simple" Python loop?
Hedy (proof-of-concept beta) attempts to reduce cognitive load by introducing programming with different "levels" that gradually and gently introduce children to new commands and increasingly complex syntax. Hedy, Hermans explains in a paper, is "a gradual language with an increasingly complex syntax, based on how punctuation is taught to novice readers in natural language education."
Hedy (proof-of-concept beta) attempts to reduce cognitive load by introducing programming with different "levels" that gradually and gently introduce children to new commands and increasingly complex syntax. Hedy, Hermans explains in a paper, is "a gradual language with an increasingly complex syntax, based on how punctuation is taught to novice readers in natural language education."
Good (Score:5, Insightful)
I was doing a bit of catching up in web programming - I haven't written anything for years, but I do like to keep my hand in.
Every single time I dip my toes into the world of web... it's a bigger and bigger shitshow.
I mean jesus wept, there's HTML with all its cruft, then Javascript with its insanity... then CSS. All of these have different syntax rules... and then there are the HTML templates (own rules), and client-side frameworks.
And then you open the can of worms that is CSS... which is so odd, it needs its own variety of languages to use it as a compile target (SASS etc).
What a mess. Lots of hard work to develop the most convoluted stuff... and make it criminally hard for a youngster starting to program. Seriously the amount of stuff needed to make progress is staggering.
Re: (Score:3)
Absolutely Correct.
You take the existing THIRD GEN language, put it into a jar and shake it up and you get Yet Another THIRD GEN Programming Language.
The only differences is that they take different portions of the language and black box it so, "magic happens here".
The other day there was a story about natural language programming. This is the kind of shit that ensures that will never happen.
Re: Good (Score:4, Insightful)
Natural language is shit!
Completely vague, extremely context-dependent, always changing, and with so much bloat, that it makes hoarder grandma's Windows ME PC look clean and tidy.
Don't be so lazy. There is no way around learning formal logic and computer hardware.
Re:Good (Score:5, Informative)
Re: (Score:3)
Yep. If you throw away JQuery, et. al., then you end up with something much simpler and easier to manage.
JQuery is only needed on resumes, it's not needed in real life any more (IE 6.0 is dead!).
Re: (Score:2)
I found JQuery has 1 good feature: the $ syntax.
nobody wants to write document.GetElementByDOMSelectorOrListOfElementSelectorsYouPoorPerson() every time when $(xyz) does the saem thing. Its only a shame jquery returns a jquery object and not a native DOM element.
If you want to teach kids how to program, teach them C. Its a tiny language, it shows how computers actually work, and once they know it enough to code, they can move on to something with higher level "easy to use" constructs else without a problem.
Re: (Score:2)
What age level? In high school C might be reasonable. Earlier Scratch would be a better choice. In C it's too hard to do anything vaguely interesting.
Note that it's harder to do anything interesting in C for good reasons. Apple ][ basic was easier to do something interesting in, but it was tied to a specific machine. And even so most who learned it were in high school or older.
C is a good first language for college students. An adequate first language for some high school students (the kind that are l
Re: (Score:3)
There is always QB64. It is cross-platform and supports OpenGL, while still running the original QBasic scripts (like Gorilla and Snake). BASIC is easy to learn, and with OpenGL on the side, it can do crazy and interesting things.
Re: (Score:2)
Re: (Score:2)
I was writing assembly at 11, if that helps.. I'd have loved C back then.
Re: (Score:2)
Yes, and I liked assembler in high school too (though computer time was so expensive I never did much). But most people want to get pretty pictures, or interesting sounds. Assembler to do that is way too hard. Perhaps if I started now I'd continue to use assembler, but I quit because every few years the computer would change to something incompatible at the assembly level. So I picked up UCSD Pascall and Lifeboat C. But when I went to work the language we used for the first several years was SPAN (tota
Just not easier than Python, please! (Score:2)
I agree about jQuery. If you use jQuery, you STILL need to know JavaScript. So now you have to know two languages - both jQuery and JavaScript. Since they are similar and being used simultaneously, it's easy to get things confused. For example jQuery objects vs JavaScript objects. I much prefer to just use JavaScript.
As for the idea of a language even easier than Python - wow I hope that never catches on! That would be terrible. Really.
The idea might be good pedagogy - it makes sense to a teacher. Bu
Re: (Score:2)
that try to pretend that a web page would be a desktop application
As much as this sounds like a valid criticism, at the end of the day when you hit compile and the result pops up with a UI on a desktop, the end user doesn't give a shit if it was written in C++, Java, or Brainfuck. I personally find it insane but if the end result is that someone who is good at HTML and CSS can throw a tiny bit of Typescript at it and suddenly have a full desktop application, who am I to criticise because the result isn't "pure".
Re: (Score:3)
Re: (Score:2, Interesting)
Re:Good (Score:4, Insightful)
At the age of 8, I found ASM intuitive and that's how I self-taught programming. Very few syntax rules to learn.
Yeah, some people aren't cut out for abstract thinking let alone coding. The #learntocode thing is a psyop by large corporations which don't like paying peasant developers executive salaries.
Re: (Score:2)
Web Bloat (Score:2)
I agree, the web-stacks have grown yuuuge. With the desktop IDE's of the 1990's, custom CRUD development tended to be distributed in organizations, with developers wearing more IT hats. But today's bloated web-stacks require more layer specialists: UI, logic layer, stack manager, database, etc. The work-shop model gave way to the factory model. It's more labor to make the same app because there is overhead for each layer to communicate among each other. The web's stateless nature and GUI-unfriendly standar
Re: (Score:2)
I was doing a bit of catching up in web programming - I haven't written anything for years, but I do like to keep my hand in.
Every single time I dip my toes into the world of web... it's a bigger and bigger shitshow.
I mean jesus wept, there's HTML with all its cruft, then Javascript with its insanity... then CSS. All of these have different syntax rules... and then there are the HTML templates (own rules), and client-side frameworks.
And then you open the can of worms that is CSS... which is so odd, it needs its own variety of languages to use it as a compile target (SASS etc).
What a mess. Lots of hard work to develop the most convoluted stuff... and make it criminally hard for a youngster starting to program. Seriously the amount of stuff needed to make progress is staggering.
But why would you move past JS, HTML, and CSS? I guess if you want to do full stack there are a variety of ways to go but even NodeJS isn't exactly new anymore.
Re: (Score:2)
Javascript is its own special kind of insanity. Simply consider that everything is an object and things start to make sense.
Not true, if I type "var a = 5" then 'a' isn't not an object. :-)
OTOH you do have a point: Realizing that functions are objects is a major step in learning ECMAScript.
(or, alternatively, that all objects have a component that contains executable code...)
Re: (Score:2)
SASS is no longer really useful in 2020 [css-tricks.com], because it and other CSS pre-processors were created before CSS had custom properties [mozilla.org].
Sass is still useful for things like For loops, or importing/exporting multiple properties via a mixin or extend.
But yeah, its basic functionality of 'make this a const' isn't as needed given Custom Properties....unless you need to target Internet Explorer
Christ yet another teaching language. (Score:2)
We already have BASIC. Bill Gates even coded a compiler for us, for Christ sake!
Re: (Score:2)
BASIC was never intended for teaching people how to program.
Maybe the language you're looking for is Pascal.
Re: (Score:3)
Do you really not know what the "B" in BASIC stands for?
Really the argument could be made that COBOL, BASIC, Pascal, and Python were all made for people learning to code.
And all of them serve that purpose fine. Honestly learning to code is about learning fundamentals. The language really doesn't matter. The potential coder needs to learn about variables, conditionals, loops, recursion, sorting algorithms, etc. Then learn about the concept of many usually built-in but commonly used functions (trims, subs
Re: Christ yet another teaching language. (Score:2)
Re: (Score:2)
Teaching coding, and actual coding are not necessarily the same thing.
Wasn't Pascal for that? (Score:5, Funny)
History repeats itself? Or is this just a rhyme?
Re:Wasn't Pascal for that? (Score:5, Insightful)
Came here to say this. Pascal was designed as a teaching language, to get students familiar with programming concepts without having to focus on syntax, but being aware that syntax is important.
This is the basic structure for your program. It makes sense. It has a name, a begin and an end.
Then somewhere around the early 2000s it was decided that it was a waste of effort to teach Pascal when it's not used in the real world, so most academic institutions decided to switch their entry-level courses from Pascal to Java, where the first thing you see is
And the intro to programming students are immediately told 'just ignore all those words, you'll be taught about them later'.
I'm pretty sure we'd have a lot more developers (and of a better quality too) if entry-level courses used the right tools for the job.
Re: (Score:2)
I'm pretty sure we'd have a lot more developers (and of a better quality too) if entry-level courses used the right tools for the job.
Or just recognize that the language isn't the problem, the problem is that not everybody wants/needs to be a coder.
No language will help if the pupil simply isn't interested.
Re: (Score:2)
Structured versus object-oriented programming. COBOL versus C.
Apples versus oranges.
Re: (Score:2)
C and COBOL are both poor examples of structured programming and poor examples of object-oriented programming.
C can be the least structured language around, and it isn't object oriented. The early versions of COBOL are close to the same. Both are bare-metal languages in their early implementations. In the early days, everything was minimalist. I think some of the early COBOL implementations even had 80-column punch card support, complete wit
Re: (Score:2)
I went through that. Straight from GWBASIC to QBasic, then VB6 all on my own. Then suddenly get thrown into Java. Drove me nuts having syntax that just got copied and pasted without me understanding it. To this day, I can understand only the inner structures of a function but can't write anything from scratch. Not that I've ever wanted to work with Java since.
Re: (Score:2)
Having looked at the examples Hedy seems to be a lot simpler than even that. You can literally just write
print hello world
and it works. The way you can then build up by starting to use things like quote marks, variables and flow control is nice.
The online demo doesn't have syntax highlighting. I don't know if that is deliberate. Sometimes it's not entirely obvious what is a keyword and what is a variable/literal etc but for very simple stuff it's not a big issue.
If main() throws you off, you shouldn't program (Score:3)
If reading Hello World in Java is too difficult for you to comprehend, trust me, it only gets worse. I have been doing this for 25 years now...you will never get a real job where you can understand every line of code end to end. You will need to be able to filter out signal from noise.
I don't think programming is something everyone should
Re: (Score:3)
Niklaus Wirth [wikipedia.org] didn't stop with Pascal either. He also created Modula-2 and Oberon / Oberon-2 to be, among other things, suitable for the development of operating systems. To prove it out he created an operating system called the Oberon System in Oberon-2 which can run on many platforms including in a browser.
Oberon-2 is probably my all-time favourite computer language. Wish I could make a living writing code in it.
BASIC! (Score:2)
What about BASIC? ;)
Re: (Score:2)
Being an "expert" in Pascal (I was a TA for intro programming) earned me my first real-world job. It was in use longer than most people think.
Re: (Score:2)
Re: (Score:3)
I was thinking Visual Basic 6, which was insanely popular with people who didn't know crap about programming (and which worked fine for simple stuff), until Microsoft took it out behind the barn and shot it in the head.
Re: (Score:2)
Marketing wise, I'm not sure the VB6 to .NET transition was handled well. Office kept using VBA. With the elimination of VB6, there is no growth path out of VBA. I find it very strange that Microsoft has an Excel monopoly in the financial industry, because of VBA macros, and provides no upgrade path.
I was never clear why .NET needed to be incompatible with VB6. I get that if you had to recode an application, you might as well use C#. However, to this day, there is still VB6 code walking around without
Sorry. It already exists. (Score:3)
Re: (Score:2)
20 Goto 10
run
Re: (Score:2)
Re: (Score:3)
Scratch has none at all.
This "scientist" needs to learn about things like Scratch before proposing new languages.
Re: (Score:2)
So starting from Scratch, how do you _gradually_ introduce syntax until you're programming in Python? Going directly from Scratch to Python is an all-or-nothing affair, introducing too much syntax in one go. Or at least that is the point they are trying to get at.
Is being sloppy really the right think to teach (Score:5, Insightful)
The question here is: do you really want to teach kids programming in a sloppy way?
Part of the fun of programming is how a tiny error can crash the program or even the entire computer in our ZX, C64 and W95 days. It's part of the 'the computer does what you tell it to do, not what you want it to do'. It's part of the challenge. And it helps abstract thinking.
So, while i appreciate the thought of teaching more kids to code and i can see the reasoning behind it, we also don't teach children they can be sloppy when writing a natural language like English. Kos iff vee dooh nod eavan ah humen kood anderstand watt te vec ya meen bro.
Re: (Score:2, Redundant)
we also don't teach children they can be sloppy when writing a natural language like English.
To some extent you're making an apples-to-oranges comparison. In general, children learn to understand and speak languages like English well before they learn to write them. So when it comes time to read and write the language, then a) they've already made and been corrected on a lot of basic mistakes and misunderstandings and ambiguities and b) they're not starting from scratch.
I think that when children (and possibly a good many adults) are learning to program, having the equivalent of that pre-literate o
Re: (Score:2)
To some extent you're making an apples-to-oranges comparison. In general, children learn to understand and speak languages like English well before they learn to write them. So when it comes time to read and write the language, then a) they've already made and been corrected on a lot of basic mistakes and misunderstandings and ambiguities and b) they're not starting from scratch.
"Scratch" is actually an excellent place to start coding without all the written stuff, syntax errors, etc.
https://scratch.mit.edu/ [mit.edu]
Re: (Score:2)
Many teachers have said the same, particularly about BASIC. All I can tell you is that I self taught myself BASIC at about age 7 or 8 and somehow turned out okay. I think the main thing at that age is get kids interested and engaged. Remember they haven't mastered stuff like basic spelling and punctuation yet, or maths beyond addition, subtraction, multiplication and division.
Re: (Score:3)
We do allow a lot of sloppiness in how children produce letters on a piece of paper -- we do not insist they are all neat, in a straight line, the same size, and so on, until a few years in. Grammar is introduced even later (for example I was starting writing letters on a piece of paper aged 4-5, and grammar was taught 8-9, and neat writing 7-8 -- something like that).
Re: (Score:2)
We do allow a lot of sloppiness in how children produce letters on a piece of paper -- we do not insist they are all neat, in a straight line, the same size, and so on, until a few years in.
I earned a grade of D in writing (printing) in second grade. Obviously, "neat, in a straight line, the same size, and so on," mattered a lot to my teacher!
Re: (Score:2)
I suppose so - after all, they'll be working with Javascript wehen they grow up so they might as well get used to pain at an early age :-)
Children are excellent at programming (Score:2)
Children are already excellent at programming.
"WANT SWEETY!"
You see? The verb / parameter sequence is the basis of almost every programming language. And the children also know how to repeat commands. Their main problem is the things they want to program (their parents) have a mind of their own.
Logo (Score:4, Insightful)
So ... yet another BASIC? (Score:3)
Why don't we, instead, not breed even more retards by giving kids too too little of a challenge because we are too incompetent to make it engaging and explain it well?
Re: (Score:2)
BASIC? Try Pascal. And then try and be less ignorant.
Isn't Scratch enough ?!? (Score:3)
Language != programming (Score:5, Insightful)
I admit, I started programming as a kid in the 70s, and I started with actual machine code for the Z80, first language used was basic. However, by the time I got to college at the end of the 80s there was a prerequisite for all programming courses called Logical Problem Solving. We never touched a computer, but we were presented problems and learned to solve them. Pseudocode was taught and allowed, but we actually lost points if our solutions appeared to be an actual programming language.
I found this to be fundamental in my own programming, because if the programming is conceptual, then a language is just syntax. If you are teaching programming and syntax at the same time then my opinion is there is a better way.
When I went back to college in 2002 I found that there was no longer a language free fundamental programming class. And I saw the kids coming in through the program seemed to associate the basic elements of programming with a language in a literal sense, not with programming in a conceptual sense. When I need a new language I don't ask if the language has a basic structure, I ask what the syntax is. These kids often seem to have trouble realizing that structures that are syntactically different may be conceptually identical.
So in my opinion we don't need another language to teach programming.
Re: (Score:2)
1) The IDE: how do I load / save my program, how do I compile and run it? What are all these options for?
2) Basic programming stuff: syntax and concepts. Why the semicolon at the end? How to use functions? What exactly are objects?
3) Translating requirements into a design, translating problems into algorithms (what you describe)
In my experience, t
Start at the beginning (Score:5, Insightful)
The language to start kids with is ENGLISH (or French, or German, or whatever language happens to be prominent in your locality).
If I had a dime for every time I had to deal with some lug nut that can't give simple friggen' instructions to complete a task, I could have been retired already. "Programming languages" are nothing more that formalized methods of providing instructions to a compiler so that it can generate machine code implementing the programmer's desire. The programmer, in all cases, must be able to enunciate what that desire is. If you can teach her to write that down in a clear and concise way, using plain [local language], translating those instructions to a particular programming language is trivial.
I repeat, for the umpteenth time, the hard part about programming is NOT the language. It is the ability to clearly write down directions to complete a task.
Re: (Score:2)
Then you might actually like this new "language" as it is just a subset of unambiguous plain English.
Re: (Score:2)
That sound deep but I call bullshit.
It's hard to really understand what "clear and concise" is until you actually start programming and start to see your instructions in action. And it's not just 8 year old kids but in the early days of computers actual math
Re: (Score:2)
There's a difference between understanding language and breaking down a task into a logical sequence of steps. But before you can use those steps you do at the very least need to speak the same language, and the point of the entire article is to teach what is important (the very thing you complain about) rather than frustrate people's learning efforts in syntax.
Re: (Score:2)
Hey, that's what I said 4 minutes before you did! Usually I say things right after someone else says them. :-)
I agree wholeheartedly.
If you can tell a person what to do, then you can tell a computer, the computer is just better at following instructions repetitively and literally.
Here's an idea (Score:2)
Maybe teach them LOLCODE [wikipedia.org] as a first language?
Just puttin' it out there...
A radical new idea (Score:2)
Re: (Score:2)
Seriously. It isn't even radical to have a made-for-education programming language. This has been done for at least 40 years.
Hyphens (Score:2)
"We don't overwhelm children with punctuation and sentence construction."
Hyphens have vanished from English in the last twenty years.
when was the last time anyone under forty used a semicolon?
how many people care to capitalize anything ever?
interobang.
L33t
Sentence construction? Meet the emoji. If interpreting hieroglyphs wasn't difficult enough, wait a hundred years then try an emoji. Iambic pentameter ain't got nothin' on eggplants.
Re: (Score:2)
Sentence construction? Meet the emoji. If interpreting hieroglyphs wasn't difficult enough, wait a hundred years then try an emoji. Iambic pentameter ain't got nothin' on eggplants.
Sometimes an eggplant is just a purple fruit.
Just do it. (Score:2)
Re: (Score:2)
Don't propose it, do it. Wasn't Java written in a weekend?
It's already implemented. https://github.com/Felienne/he... [github.com]
We need a new language! (Score:2)
Oblig:
https://imgs.xkcd.com/comics/s... [xkcd.com]
Also BrainF**K
https://en.wikipedia.org/wiki/... [wikipedia.org]
Can't let our younger generation off that easily...
Re: (Score:2)
"Hello World" in BF according to Wikipedia:
++++++++[>++++[>++>+++>+++>++>+>->>+[>.>---.+++++++..+++.>>.>+.>++.
With kids, it should be less about syntax (Score:2)
Haven't we been down this road before? (Score:5, Informative)
Kemeny and Kurtz designed BASIC for exactly that purpose. It worked, quite well.
Wirth designed PASCAL for almost exactly that purpose. It worked, quite well. A *LOT* of people looked HARD at it, and noticed that the students who started in PASCAL came out a lot better than the ones who started in FORTRAN. (It is significant to note that, when the US Department of Defense put out the requests for a common language for defense embedded systems, all four of the contractor proposals used PASCAL as their starting point. When DoD contacted Bell Labs, asking Bell Labs to propose a language based on C, Bell Labs demurred, saying that C was not then and would not ever become robust or reliable enough for DoD embedded systems work.)
Abelson & Sussman chose LISP for their start-from-nothing book, precisely because LISP had almost no syntax. They chose the Scheme dialect, because it designed out some of the more "interesting" kludges in earlier dialects of LISP. I will grant that "Structure and Interpretation of Computer Programs" is not the easiest book in the world to read all the way through, and it almost requires a really good instructor to go with it, but the early stuff is very simple and very understandable.
Perhaps the right answer is, before we propose Yet Another new programming language, we spend some time looking at what has already been done.
Re: (Score:2)
> Perhaps the right answer is, before we propose Yet Another new programming language, we spend some time looking at what has already been done.
Indeed. /Oblg. xkcd standards [xkcd.com]
Or as Bjarne Stroustrup famously said [stroustrup.com]: "There are only two kinds of languages: the ones people complain about and the ones nobody uses".
Every programming language sucks. The trick is to find the 2 that suck the least for oneself.
Slashdotters Agree: We Already Have Perfection (Score:2)
Lots of post here arguing that the perfect teaching language already exists, and it is thus impossible for anyone to make a better one, and foolish to even try. It is nice to know that in this one area of programming and computer science there is no further room for improvement.
But there is little agreement on what that language is. Pascal? BASIC? Scratch? Logo? Python? ...
Slideshow (Score:2)
The examples on the web site are provided in a slideshow format. Also, it only progresses you forward, so if you want to return to a previous lesson, you have to restart. Really?
Nothing is understandable unless it looks either like a PowerPoint presentation or an "app", and can't follow basic document navigation rules?
make things easy and dumbed down? (Score:2)
If we make things easy when it comes time to do difficult things it would be intolerable because the brain won't be able to cope with it. I mean, we could skip teaching kids to read because reading is hard, so why not just teach them stuff by talking? But we don't, because if we did that it takes much longer to deliver the same information in later stages of life. What I mean is, there may be inherent value in doing tasks that are difficult, require sustained effort that takes time and patience, and overcom
Syntax is not the biggest problem (Score:2)
Why? (Score:2)
I like it (Score:2)
I looked at levels 1-7 and I think it's a nice educational progression. I've seen the frustration on the part of young kids trying to use an actual programming language like Python -- including some *very* smart ones who 10 years later became excellent techies, so ideas like this are very valuable.
I'm not sure whether I consider it better than Scratch, though, with its intuitive visual elements. At least the name is better, assuming it was named after the great Hedy Lamarr.
Pascal (Score:2)
What else?
Not new approach (Score:2)
I propose Scala (too many programmers) (Score:2)
I've been programming in multiple languages for decades, and Scala, while the academic goals were admirable, has resulted in a mess of a language - to the point of where you need a syntax analyzer to understand what was written. Therefore, a pointless language. We started using it in some projects where I work, and now they are going ba
Re: (Score:2)
Re: (Score:3)
Then why does Arduino code need a ; at the end of every line? If every line has s ; then its the same as no lines having one.
There are a couple cases where statement-terminator languages (C, Java, etc..) require the terminations in order to avoid ambiguity.
There are a couple cases where line-continuations languages (BASIC, Assembler..) require the continuations in order to avoid ambiguity.
z = x + y c = a + b
Consider the above. There is no reason that the compiler cannot determine that this is two statements, regardless of line terminations and statement terminations.
Probably ten thousand programmers have realized this o
Re: (Score:2)
You're right: the compiler should automatically expand your example to
c = a + b;
z = x + y * c;
Or wasn't that what you intended?
Re:Explain whitespace (Score:4, Interesting)
The reason for all the fiddly syntax in languages that are considered unsuitable for teaching to beginners isn't to make programs harder to write: it's to make them easier to debug. If a program written in a language with a flexible and forgiving syntax doesn't do what you want, you sometimes have to figure out what you really told the computer to do before you can start figuring out how those instructions are wrong.
JavaScript has a feature called automatic semicolon insertion, which is meant to make it easier for people who shouldn't be writing programs to write programs. It might be OK on its own, but it interacts badly with other features that are supposed to benefit people who shouldn't be writing programs. Broadly speaking, it says that if a line doesn't end in a semicolon, but would be syntactically correct if it did end in a semicolon, the interpreter assumes that you meant to put a semicolon there.
For instance, if you have this at the end of a function:
return
true;
JavaScript interprets that as return; true; which causes the function to return an undefined value. The true; after it is ignored, firstly because JavaScript doesn't complain about unreachable code, and secondly because every statement in JavaScript is really an expression that returns a value. Often you don't care what the value is, so the interpreter doesn't complain if you throw it away.
Re: (Score:2)
the compiler should automatically expand
In the IDE or internally?
If the compiler 'knows' that z = x + y c = a + b is two statements then why should it mess with the way I have typed it in?
Maybe you meant the IDE. If that re-writes my code as it thinks it will be parsed and that's not what I meant, I can catch the error and fix it right there.
Re: (Score:2)
Re: (Score:2)
What else would beginners who are familiar with algebraic conventions but don't know the syntax of any programming language expect it to mean?
Re: (Score:2)
Arduino code doesn't need a ; at the end of every line, it needs one after every statement (to separate them).
What you're proposing is the equivalent of a written language with no full stops (or local equivalent).
(and what Python proposes is the equivalent of starting every new sentence on a new line, paragraphs be damned)
Re: (Score:2)
I'm a hardware guy so bear with me. What is the advantage of whitespace code like Python?
It's supposed to be about readability - if you force use people to use correct indentation then your programs should be easier to quickly scan through.
Languages that use braces { or line terminators (; . etc) have different styles of indentation that can be confusing and / or annoy people - the wiki page on indentation styles [wikipedia.org] will show you how many preferences there are - lots :)
Re: (Score:2)
Badly formatted code written in a whitespace agnostic language like C takes a single keypress to sort out.
Whitespace also has no defined size, and so it can sometimes be hard to identify, especially in print, or if it is presented in a variable width font.
If you indent one line incorrectly in Python, your program will behave weird when it gets to that point in your code, while if you forget a single brace when you shouldn't have, your code will actually fail to compile, notifying you immediately of you
Re: (Score:2)
I agree - that's why I said "supposed to be about"
In end end it is all just syntactic sugar [wikipedia.org]
Re: (Score:2)
Doesn't. Following is function statement from a program:
// Reverse run state. // Start things up. // Turn off display.
if (master.justOn())
{ running = (running=0)?1:0;
if (running) { turnOn(); }
else { turnOff(); }
}
Re: (Score:2)
Re: (Score:2)
for what?
It avoids triggering autistic meltdowns.
Someone posted the Wikipedia page on indentation styles [wikipedia.org] with the observation that some styles irritate people. I don't know. I can figure most of them out (the ones with BEGIN/END, curly brace delimiters or semicolon separators). I've read and patched code with mixed styles. Where each developer had their own way of doing things. No big deal. If I'm patching something written in a consistent style (or working for a group that has adopted a style guide), I'll use that
Re: (Score:2)
I very much like case-sensitivity, both in everyday language, and in programming. It allows for many more variable names, even when restricted to ASCII, without cluttering things up with hard-to-read characters. It allows one to ADD EMPHASIS (very much part of human spoken and written language).
It's a perfectly cromulent way of expanding the name-space.