Over a million developers have joined DZone.

Move Over Python: Entering a New Lever Age

Sure, Python is kind of fun and kind of easy. And who wants to compile anyway. But some of us don't feel at home with the interpretive dance we must do with Python. As a C++ programmer I would like the simplicity of Python but with more leverage. Introducing: Lever.

· Web Dev Zone

Make the transition to Node.js if you are a Java, PHP, Rails or .NET developer with these resources to help jumpstart your Node.js knowledge plus pick up some development tips.  Brought to you in partnership with IBM.

Lever is a new open-source language. And, by new I mean version 0.8.0, which I translate as "will have some odd features/bugs but may run for hours at a time without crashing". It promises all the flexibility that we've come to enjoy with Python yet it teases us with the power of raw native code and the promise of stand-alone executables.

I can't claim to have used Lever for any projects and I'm not at this point endorsing it, but the idea seems quite intriguing. First of all, Lever promises the simplicity and naturalness of Python as well as execution speed improvements similar to the just-in-time compiling provided by PyPy. But adds some tricks of its own, and these are the ones that caught my attention.

Because it compiles into an executable it lends itself to using other compiled libraries. This early version of Lever supports the easy inclusion of existing C libraries:

sdl = api.library("libSDL2")

Dare we say that we can Lever-age the power of our existing C code? (Sorry)

Lever supports the scoping of modules. All of the loaded modules are not required to go into a single global object.

There is also a built-in event loop syntax that makes your asynchronous code smaller, cleaner and much more readable. And my guess is that this new asynchronous syntax will help with the development of concurrency because the code looks nearly the same whether it "waits and continues" or whether it "triggers a call back". All you need to do to add the call back support is to add the callback function name to the event call. And of course you must still write the callback function, but the point is that this can be more easily deferred in your development process.

There is an active Lever development community and you can get more details here. Lever has its home on GitHub. And they've done a nice job of pairing the new language with the relatively new cross-platform editor environment from Microsoft called Visual Studio Code.

I usually resist the introduction of yet another programming language, and I don't know if Lever will succeed, but if it does I think it will offer a useful bridge between academic research based on Python and production code based on C/C++. Here's hoping.

Learn why developers are gravitating towards Node and its ability to retain and leverage the skills of JavaScript developers and the ability to deliver projects faster than other languages can.  Brought to you in partnership with IBM.

python ,lever ,programming languages

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}