Floydlang/floyd

Will it take up a lot of memory?

6643 opened this issue · 6 comments

6643 commented

if for while It seems that there is no need to use parentheses.
func can keywords be discarded?

recommended support for string templates.
${ a + 1 }${ b(5) >> 2 }c

I suspect that the memory overhead is really big.

Floyd's syntax is designed to look familiar to programmers used to C / C++ / Java / Javascript / C# etc. I could be possible to change the syntax to get rid of the parenthesis, but that would make Floyd code look a little unfamiliar to people.

The func keyword is needed to define a function or function prototype. It's needed because Floyd allows complex type definitions inplace, where languages like C requires them to be typedefed separately.

Memory: the aim is that Floyd programs use the same amount of memory as C or C++ programs = very little. We're not there yet. I don't know the exact memory usage right now, but it should be pretty good already running on LLVM.

I'm closing this for now. Feel free to reopen if my answer wasn't complete!

6643 commented

It's more advanced to remove the brackets. Many new languages have no parentheses. Parentheses don't cost learning.

Dart is also a pre-return type and has no function keywords.

Basic grammar learning costs are not high, and feature learning costs are high.

The new language should accept more scientific.

Just some suggestions, adoption or not based on your considerations.

True. I will reconsider modernising the syntax!

It's probably just a matter of changing read_enclosed_in_parantheses() to see what it's like without the paranthesis!

6643 commented

I just think that the brackets are optional,
No parenthesis code looks clearer.

if(a()){}
if a() {}

if(a()(1)){}
if a()(1) {}