
Show HN: Onnemi-4211, A minimal coding style that can be used with any language - erikpukinskis
https://github.com/erikpukinskis/onemmi-4211
======
qwerty456127
Now try to code a Python class with an 'if' clause within a 'with' clause
within a 'try' clause within a method while following the convention and using
4-space indentation. Also don't hesitate to specify type hints in your
variables declarations ;-)

Sure, making code as narrow as possible is good but some languages can make it
very hard.

------
OceanKing
Re: One Language

Imagine writing a web app. Writing HTML and CSS inside your JS codebase seems
like a terrible and inconvenient idea, especially combined with the “150 lines
per file” thing. You’ll have a JS file which will basically contain just HTML
and some logic to put it in the DOM (and by the separation of concerns
principle, if the file was less than 150 lines you’d probably just end it
there anyway)

With a large web app, this would grow to hundreds of JS files. Some of these
files would be by necessity named something like “page1-html.js” or something
similar. At that point, you may as well call it “page1.html” and save yourself
the headache.

------
erikpukinskis
Happy to answer questions if anyone finds it intriguing.

~~~
rpz
Very refreshing! What do you mean by no builds though?

~~~
erikpukinskis
Thank you!

In the case of JavaScript, it means there's no step where you build your
source files into a runnable application and then run it. You just run the
application directly.

But really this is just a corollary to the "One Language" idea. It means, if
you need to build something, build it in the language your app is in, as part
of your application logic. Building themselves is part of what applications
do, not a thing done to applications.

A lot of this is inspired by the Jai programming language, which is a C-like
language that lets you configure the compilation and build process in the
language itself as part of the application. I wanted to try to take Jonathan
Blow's ideas and apply them in JavaScript and then radicalize them.

