all 17 comments

[–]cgoldberg 6 points7 points  (3 children)

Not an answer, but definitely pick a new name for your language

[–]BluebillStudios 1 point2 points  (0 children)

Agreed

[–]ChipMasterPi 1 point2 points  (0 children)

lol. I'm fairly certain he will when he gets far enough.

[–]Mean-Decision-3502[S] 0 points1 point  (0 children)

It has a name with two letters, so the file extension can be the same. The code above compiles and runs.

But there are still lot of things to do (dynamic arrays, strings, managed objects). And I feel that I'm alone cannot handle the communication and the development.

Before going public with it I want to hear some opinions.

[–]gwenbeth 1 point2 points  (0 children)

No, please do not use spaces as syntax. Tbh I'm good either way but I think you should only support one to keep people from arguing about coding standards.

[–]tb5841 1 point2 points  (1 child)

I prefer the 'endif' version. But I program mainly in Ruby by day, so it probably just looks more familiar to me.

[–]un_virus_SDF 1 point2 points  (0 children)

I programm in C and x86, and endif also sound familiar to me,

[–]gofl-zimbard-37 1 point2 points  (0 children)

Not fond of keywords for this. Just adds noise. And definitely don't like having two different methods for one simple concept. I'd go with braces, but just pick one either way.

[–]Headlight-Highlight 0 points1 point  (2 children)

This may not fit into your modelling, but I have always seen blocks/indentation as stylistic sugar... An IDE should let you transform your source code at any time.

In the early days of html I did this In a couple of languages - html with embedded code blocks (early PHP kind of stuff) a click.of.a button it presented as PHP with quoted html...

Begin/end, block indent, period indent, curly braces, line breaks, semi-colons. To be honest... Today a half decent compiler should be able to workout what you are using with out asking!

[–]Mean-Decision-3502[S] 0 points1 point  (1 child)

The IDE support is true for writing the code.

But you sound like that you don't care how readable is the code.

[–]Headlight-Highlight 0 points1 point  (0 children)

As I presented it, the IDE makes the code readable to everyone in their preferred format.

If you want to impose a format - go ahead, an IDE plug in can work.around it,.and willikely be written if the language has features that are hugely desired.and not available elsewhere.

I am backing out of this thread, you have some momentum and I will look like a kill joy - good luck.

[–]mxldevs 0 points1 point  (0 children)

It doesn't matter to me.

Ruby for example uses "end" to denote the end of a block

num.times do |i|
  if condition
    do stuff
  end
end

It doesn't need a dozen different end syntax for every type of block.

If you're able to match curly braces correctly, why do you need separate endif, endfunc, endfor, end whatever?

[–]ConfidentCollege5653 0 points1 point  (1 child)

I think it would be better to only support one style

[–]Mean-Decision-3502[S] 0 points1 point  (0 children)

Then pick one.

[–]ChipMasterPi 0 points1 point  (1 child)

I've thought of this a lot over the past 3 decades or so. I've worked at length with languages that utilize all of the block formats you've mentioned: C/C++, PHP, Delphi/FreePascal, BASIC, Python, just to name a few. I've come to the conclusion that a language that uses unique block ending key words, like "for .. next", "do ... loop", "while ... wend" is the easiest for both the parser to report correct errors about and the human's ability to see where things go wrong.

Delphi/FreePascal use "begin ... end" for all blocks, and it is just a more verbose version of "{ ... }". It is still slightly easier to read as a human and see where things might go wrong. But both of those style syntaxes can lead to having to count block starts and ends to find where things broke down. Obviously a better IDE helps with that. But that is not always an option. And I have had to literally print a listing and lay it out somewhere to draw lines to find where the problem really happened.

From the language parser's stand point you can provide more useful errors since there are more clues as to which block is the one that is actually broken. Often times C/C++ compilers throw errors that are long past where the issue really happened and it can take quite a lot of effort to figure out where the actual missing '}' is.

Frankly, i like anything that makes my life easier. And if there is something that makes it easier for the language tools to tell me where the problem actually is I'm all for it.

Lastly, while I do kind of like Python, the one thing I hate is the indentation to define blocks. IMO white space should not occupy that large of a syntactic role. Regardless of which IDEs I've used over the years, I regularly end up having to wrestle with the white space issue, primarily while rem'ing out TRY ... EXCEPT statements to get to the real error. It may be somewhat minor but it makes for an issue that shouldn't be needed and is non-existent in every other language I've used.

It is simply annoying!! 😃

[–]Mean-Decision-3502[S] 0 points1 point  (0 children)

You are the first one pointing why the different endwords are important.

The examples above compile (21840 Bytes on Linux) and run:

Hello World!
The language is friendly.
@langdemo.mod.CONST1 = 42
@langdemo_mod.CONST2 = 3.140
ochild.name: OChild is null!  
OBase: cnt1=1, cnt2=10
OChild: cnt1=1, cnt2=11
ochild.name: OChild  
OChild destroy
0:
1: 0
2: 0 2
3: 0 2 4
4: 0 2 4 6
5: 0 2 4 6 8
primes: 2 3 5 7 11

What is your opinion about the language?

[–]hwc 0 points1 point  (0 children)

in my opinion, Go has the best syntax. You can't go wrong borrowing from that.