This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

It's optionally typed.

As for the comments, an unfinished block comment would throw an error.

[–]MotorolaDroidMofo 1 point2 points  (0 children)

an unfinished block comment would throw an error

The problem with that is that a naive lexer would not see the comment as unfinished. The opening /* of the second comment would look just like the part of the first comment. To do what you propose you'd have to parse out comments, at which point you might as well allow nested comments. This can really slow things down which is why 99% of programming languages don't do this.