I had some discussion lately with @brianiac.5, the inventor of Lexon and one of the judges of the past DAO-FI Fusion Hackathon and he provided me some feedback & questions that I want to share here and get answered/commented by @radrow.chain, @ghallakaeternity.chain or @hanssv.chain
Question 1 (Henning)
As discussed in the community live event of the hackathon: is it true that you can’t dynamically hook in any functionality afterewards in any way? A la Solidity delegatecall()?
Question 2 (Henning)
Have you made the extension that you can write state.a = b
instead of put(state{a = b})
?
Comment (Henning)
In general I also think that some people give up with None
and Some(_)
. Would be great if you could find “Sugar” for the necessary switches for assignment and readout, so that you don’t have to use option functions (e.g. Option.force) everywhere.
I have specially developed an option that you can create ‘unsafe’ code, but it is much more readable. Isn’t it supposed to be one of FP’s strengths, that it’s WELL readable?
The assignment via put(), combined with Option.force
makes the code so unreadable that it again becomes harder to find errors, maybe “just” even harder to understand it and keep track of the business logic behind it. Little effort is needed for this, I think, as allowing “Sugar” to break up the pure doctrine and also make it more inviting to newcomers. But also purely practical, to make it more readable.
Specifically, I mean things like:
switch(state.x)
None => put(state{x = y})
Some(_) => put(state{x = x + Option.force(y)})
Alternatively probably:
put(state{Option.default(x, 0) + Option.default(y, 0)
Where the simple point is to please make x += y
.
Comment (Henning)
Ref: Syntax - æternity Sophia Language
I think a sophisticated language like Sophia should be documented a bit more extensively. I’m probably not alone in not watching videos and tutorials. I like to have the basics dense. But this is a little too dense for me. The content should be presented in a slightly less encapsulated way.
Feature request (Henning)
It would be great if the compiler allows block comments, example:
Message(/* from */ indexed address, /* to */ indexed address, string)
Comment (Marco)
Henning also mentioned that he in general loves Sophia, just to make that one clear
This is just some feedback I wanted to share here in the forum to discuss.