I hope you’ll find the time and energy to keep on writing these. It’s a pleasure to read.
Nice work on Sophia, it’s a neat small language.
Not sure if you’re open to feature requests, but exposing host functions, similar to wasm/lua/etc. would be great. One could write most of the logic in Sophia but hook into the extensive go ecosystem when needed.
Im always open for feature request, you can simply create an issue for one :). I would know how to implement that but i will do some research about it.
Do you actually use Sophia? Whenever I see these little langs, I often wonder if they’re being used by anyone or just being developed for their own sake.
Yeah somewhat true, I started the programming language for the sake of learning about the creation process - still I put my ideas of features i want and like into the language, it fits my need, even with somewhat complicated syntax.
I thought the alternative syntax was quite unreadable: (fun name (params) (body statement)) and made distinguishing between statements belonging to function parameter and body hard. I employed the same syntax for defining for loops:
(for (_ i)
(put i)
)
instead of
(for (i)
(put i)
)
TL;DR: _ is used in function and loop definition for declaring parameters and variables usable in the current scope and for improving readability of the language.
I hope you’ll find the time and energy to keep on writing these. It’s a pleasure to read. Nice work on Sophia, it’s a neat small language.
Not sure if you’re open to feature requests, but exposing host functions, similar to wasm/lua/etc. would be great. One could write most of the logic in Sophia but hook into the extensive go ecosystem when needed.
Im always open for feature request, you can simply create an issue for one :). I would know how to implement that but i will do some research about it.
Do you actually use Sophia? Whenever I see these little langs, I often wonder if they’re being used by anyone or just being developed for their own sake.
Yes I‘m trying to finish the link to the go std and afterwards do advent of code and create a web service with sophia.
It sounds like these are exercises for the language rather than you making a language to fill a need. No judgment, just an observation.
Yeah somewhat true, I started the programming language for the sake of learning about the creation process - still I put my ideas of features i want and like into the language, it fits my need, even with somewhat complicated syntax.
I know a woman named Sophia Lang. This link was very confusing for me until I figured out what was going on 😅
Nice keep up the good work.
PS: I recently used your hugo theme to update my blog. 😅
niceee, im honored and will absolutely have a read.
Hi - what is the underscore for in the parameter form when defining functions?
I thought the alternative syntax was quite unreadable:
(fun name (params) (body statement))
and made distinguishing between statements belonging to function parameter and body hard. I employed the same syntax for defining for loops:instead of
TL;DR:
_
is used in function and loop definition for declaring parameters and variables usable in the current scope and for improving readability of the language.Got it. _ is usually the ‘discard’ match in pattern matching, so that is where my mind went.
Thx