34 comments

[ 2.9 ms ] story [ 64.4 ms ] thread
Most of the samples don't show anything for me... Maybe a description of what it's supposed to be, at most. No code or files.
> Neon syntax is not sensitive to whitespace, and does not have statement separators. Neon source code is case sensitive, but there are no requirements on the case of user-defined identifiers.

What's with the uppercase keywords? It was fine in BASIC and okay in SQL but I don't want to hold down my shift key that much while coding.

Yeah, no thanks with that.
Caps lock is cruise control for coolness
Docs mention that the uppercase keyword feature is inspired by Modula 2. However, I expect that most editors can highlight keywords so I don't see how this is a problem. If it is a problem it seems like there is a simpler solution.
Unless you are stuck in MS-DOS, all modern IDEs do auto capitalization of keywords.
It's a very pretty language. It's Pascal if Pascal were made perfect. Because it seems amenable to Hindley-Milner Type Inference, if it had that, it would be perfect. Imagine having beginners program in a Pascal-like language without having to worry about typing out types!
I agree. I like it because it is mostly words, like lua, rather than symbols.
Dunno. Not having to type types is a must have feature for a hacker's choice language. I'm no educator, but I think the case could be made that in a statically typed language, you'd want beginners to think about types.
For a language that doesn't mention BASIC anywhere in its influences, it looks an awful lot like BASIC.
If I'm teaching young'ns per se using a toy language, I'd reach for Scratch. It's history and Google's embrace of it seem like strong endorsements. Are there other good candidates in that space?

If I'm teaching an intro class using a general purpose language, it's Ruby or Python. My heart lies with Ruby, but having basic Python chops is such a bigger win downstream.

  for i in range(1, 101):
      if i % 15:
          print ('FizzBuzz')
      elif i % 3 == 0:
          print ('Fizz')
      elif i % 5 == 0:
          print ('Buzz')
      else:
          print (str(i))

  (1..100).each do |i|
    if i % 15 == 0
      puts 'FizzBuzz'
    elsif i % 3 == 0
      puts 'Fizz'
    elsif i % 5 == 0
      puts 'Buzz'
    else
      puts i
    end
  end
(comment deleted)

  (1..100).each do |i|
   puts case
     when i % 15 == 0
       'FizzBuzz'
     when i % 3 == 0
       'Fizz'
     when i % 5 == 0
       'Buzz'
     else
       i
     end
   end
(offtopic) You might be missing an '== 0' in the second line there? I've never done fizzbuzz so I honestly don't know, but the ruby version has it.
Zero and empty lists and dictionaries are treated as False in Python.
I actually really like that somebody finally used decimal floating point as the default.

The problem is that any small language must have a way to reliably manipulate integers properly, or it's just not getting anywhere. It's okay for that to not be the default, but it must exist.

I dont understand this unspoken contest to make new programming languages look like archaic ones from the 1960's. No beginner programmer wants to see := or upper case keywords.
While I agree in the case of upper case keywords, I consider := and = to be actually better than = and ==. That would also help to avoid syntactical abominations like === and !==.
I couldn't agree more. I grew up using Pascal and am currently teaching C++ for undergrads; I often realize that some errors done by the students could have been prevented, had they used Pascal.

It's not only a matter of clarity in using an asymmetric := for assigning the right side to the left side (the "=" symbol suggests that left and right side play the same role). The biggest problem is rather the fact that it's so common for newbies to write "=" when they want to express equality. (I teach in a physics department, and the mathematical background of my students is extremely solid.)

Why are new languages compelled to show you how to print to console??

> print("Hello, World.")

Literally the least interesting thing about any language.

On the contrary, I believe the example already tells something. Consider all the boilerplate you have to put around the "print" statement when you write the same program in C++ or Java:

  #include <iostream>  // Needed to use std::cout

  int main() {  // You need to wrap the code into a "main" function
    std::cout << "Hello, World.\n";
  }
At least, the example shows that Neon is in the same ballpark as Python, Ruby, Nim, etc.
Ok, true. Still, I really want the language's one-pager to show me right away what's awesome and different.
> print("Hello, World.")

That's not even as concise, clear and beautiful as Python 2 or BASIC:

print "Hello, World."

“Neon is a high-level, statically typed, garbage collected, imperative programming language intended for teaching and learning the craft of programming.”

and:

“TODO: Tutorial goes here”

Says it all, really.

..

Pascal is [thataway](https://www.freepascal.org/) for those that care.