Hacker News new | past | comments | ask | show | jobs | submit login
Zolang – A programming language for sharing code between multiple platforms (github.com)
40 points by valdirun 5 months ago | hide | past | web | favorite | 22 comments

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.

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

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

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.

This may come across as rude, so I apologize in advance, but... You sound very optimistic and so clearly are not a programmer.

The same could be said about your comment as this sort of dialogue, or rather lack of, is what perpetuates stagnation. We’d still be writing assembly if weren’t for optimism by engineers.

I think if anything we need loftier goals and more optimism to solve problems.


The person I replied to is not an engineer. He is an optimistic non-engineer. Maybe he will change the world, but more than likely, he is the standard "use machine learning to solve this impossible problem in 2 weeks" type.

(I'm dealing with a client doing just this right now.)

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.

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.

I agree. This will be hard to scale to an entire application, I would not recommend using this as of now except for very platform independent logic, but hopefully with new releases and more meta-programming (or perhaps meta-meta-programming) features more usage options could be viable.

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

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.

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?

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

    make i be i plus 1
What's with the verbosity?

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 :)

Do array indexes start at 1?

    let i as number be 1

    while (i < person.friendNames.count) {
      make i be i plus 1

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

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

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

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

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

This is officially my favorite comment

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact