TodePond / DreamBerd

perfect programming language
https://dreamberd.computer
Other
11.33k stars 349 forks source link

Support more keywords for creating functions #605

Open its-miroma opened 6 months ago

its-miroma commented 6 months ago

As we know, DreamBerd is a very open language, that welcomes developers from all backgrounds.

Unfortunately, some categories of coders cannot feel at home when switching to this language, due to the unusual way of defining functions, with letters from function as opposed to the def keyword.

To fix that, I propose that DreamBerd should support using any letter from the sequence functiondefinition, which allows code like this:

// For Appreciators Of Verbosity
functiondefinition add (a, b) => a + b!

// Excuse me, do you speak Snake language?
def add (a, b) => a + b!

// This is fun, innit mate?
funinnit add (a, b) => a + b!

// A bit ironic
undefin add (a, b) => a + b!

// Come on, this is beautiful
condition add (a, b) => a + b!

// This is fine
fine add (a, b) => a + b!

// When a function is spooky
oo add (a, b) => a + b!

// This is for you, C programmers
int add (a, b) => a + b!

// This is even more evil...
if add (a, b) => a + b!

// For functions that don't work as they should
not add (a, b) => a + b!

// Functions defined like this cannot be called outside lunch time
noon add (a, b) => a + b!

// With this syntax you don't even have to export,
// DreamBerd can take care of finding this function!
find add (a, b)!

// ... and I'm sure there are many others ...
Known Issues This may conflict with `int`, which can be changed to: - `single`, as opposed to `double` - `sink`, as opposed to `float` - `secure`, instead of `integrity` (thanks @iGoodie for the clarification) - `derivative`, as opposed to `integral` ~~(that's what `int` stands for right?)~~ - `refined`, as opposed to `whole` (also called `integral`) bread - `continue` (because no loops use it), as opposed to `interrupt` This may also conflict with `if`, which can be changed to: - `whether`, the most obvious synonim - `weather`, because I always confuse these two - `wheather`, so everyone is happy - `check`, and at the end of the program `checkmate` I know you all are way smarter than me, you'll surely come up with better alternatives.
iGoodie commented 6 months ago

You have a wrong assumption, int doesn't stand for integral at all! int means integrity, all about security.

Adding following statement at the entry of your program will make it more secure: ~int int var var x = Integer.MAX_VALUE!~ int int var var x = Integrity.MAX_VALUE!