TodePond / DreamBerd

perfect programming language
https://dreamberd.computer
Other
10.62k stars 299 forks source link

INTERCAL-compatibility mode? #633

Open c3d opened 1 month ago

c3d commented 1 month ago

I like the idea of being able to express emotions, e.g

print("Sure")!

vs

print("Sure")?

However, I feel like we might hurt the compiler's feelings, so adding support for please and would you be kind enough to seems like a minimum. For example:

please print("Sure")!

or

would you be kind enough to print ("Sure")?

Now, the simplest way to do that is probably to add full-fledged support for INTERCAL in DreamBerd. Obviously, we need to have come from (since goto is evil), and the unary OR operator in INTERCAL with its bit interleave is a bit hard to emulate, so we need to have it baked in.

I also feel like DreamBerd's syntax for assigning values to numbers, e.g. 5 = 2+2 blends quite well with the notation for variables in INTERCAL, e.g. .5 for variable number 5. You could interpret .5 as a "floating point variable", which would be both interesting and totally wrong.