
Zolang – A programming language for sharing code between multiple platforms - valdirun
https://github.com/Zolang/Zolang
======
erlend_sh
I'm a product designer and not a programmer but for what it's worth, I think
you're really on to something here. Zolang strikes me as a very powerful
coupling with Rust, in particular in GUI development. I'm not judging your
programming based on its syntax or standard library but rather by its problem
statement.

The most notoriously difficult problem in GUI development is cross-platform.
It's a holy grail within software development. Every major company is taking
an increasingly larger stake in this race and a few like Qt are selling it
directly as their core product.

Zolang sounds like it could be a bit like Elm or Flutter, but one layer above,
able to orchestrate a little bit of platform-specific glue code where it's
always gonna be necessary.

The programming language landscape is extremely tough. It's very hard to beat
any language on language features alone. You also gotta compete with its
community, its libraries, the enterprise support and so forth. You gotta carve
out a really special niche for yourself, your very own domain. And I think
Zolang's domain should be GUI development.

~~~
thepumpkin1979
OP, this is the comment you should be paying attention to. The (now downvoted
to oblivion) counterpart to this comment sounds a lot like the top comment on
Dropbox “Show HN” of it’s time: a totally engineered reasoning with zero core
product value thinking [0]. Instead you should go deep, as in digging a hole
or “Well”[1].

[0]
[https://news.ycombinator.com/item?id=9224](https://news.ycombinator.com/item?id=9224)

[1]
[http://paulgraham.com/startupideas.html](http://paulgraham.com/startupideas.html)
(special emphasis on the the “Well” section)

~~~
cheez
I disagree that it's analogous (surprised that it would be considered so). I
made no comment on the merits of Zolang. I responded to an unaffiliated third
party about _his_ comment being optimistic.

------
skohan
The main issue I see for this is debugging. With transpiled languages (unless
you have great tooling) the debug stack is normally in the target language
rather than the development language, so there's a lot of cognitive overhead
in figuring out how the machine-generated output maps to the code you actually
wrote.

Also, since this is essentially metaprogramming, any domain where performance
is a concern is going to be problematic to handle.

As far as cross-platform support, the LLVM approach seems like the right one
to me.

~~~
irq-1
This would do better as a precise, low-level programming template language. If
it generated both strictly typed and safe code, and optimized code, it could
do what C often does today -- except it could transpile to the target language
instead of being compiled/linked in. Think zlib, base64 or (maybe?) crypto
functions.

------
dikei
Interesting concept, though I figure this will be leaky abstraction on
steroid.

------
cheez
I'm compelled by others responses to my comment to encourage you and say that
you are absolutely solving a real problem.

Many-an-occasion, I have written foo.xml and translated it to
Python/JS/Java/C++/Excel/whatever.

This type of thing is very useful in that use case - though in my case, it was
generally used to add bindings to C++ code.

------
pmontra
Interesting idea. In practice how do you isolate/integrate the generated code
from/with the handcrafted one? Does it feel natural?

I'm also really curious about the rationale for the cobolish make a be b minus
c. Cobol did that because it didn't aim to be used by programmers. How about
Zolang?

~~~
valdirun
Originally this language was created simply for creating a sharable model
layer which can have some embedded logic, so originally I wanted to keep non-
programmers in mind while designing this as the model layer is the most basic
part of an application and very easy for a non-programmer to understand the
concept of.

But you can do (a + (b - c) * d) in Zolang as well, the choice is yours

------
V-2

        make i be i plus 1
    

What's with the verbosity?

~~~
valdirun
you can do

make i be (i + 1) * (a / b)

as well as

make i be (i + 1) times (a over b)

make i be (i + 1) times (a divided by b)

The choice is yours :)

------
danielhlockard
Do array indexes start at 1?

    
    
        let i as number be 1
    
        while (i < person.friendNames.count) {
          print(person.friendNames[i])
          make i be i plus 1
        }

~~~
valdirun
it depends, Zolang doesn't care for this (but it should, and will later on)
and just forwards values. So if you're transpiling to languages that have a
first index as 1... then yes :'D

------
tlarkworthy
This could be a powerful technique for emitting formal specifications for
model checking and have some confidence the state machines are all in sync

------
bsaul
Funny reading this after the protobuf rant. Seems like serialization would be
a nice feature to add as well.

~~~
valdirun
Yup! The plan is to have all types easily JSON serializable and let the
language generate serialization and deserialization methods

------
muterad_murilax
That logo/mascot thing must die, though...

~~~
valdirun
This is officially my favorite comment

