Imagine the perfect programming language

Imagine the perfect programming language.
What can it do, what doesn't it do, and how does it look?

Other urls found in this thread:

clash-lang.org/
yesodweb.com/
github.com/colah/ImplicitCAD
wiki.haskell.org/Applications_and_libraries/Music_and_sound#Libraries
idris-lang.org
golang.org/
github.com/nox/rust-rfcs/blob/master/text/1210-impl-specialization.md
twitter.com/NSFWRedditGif

Receipt for the perfect programming language:

GoLang + Generics + Null safety + Lambda expressions

>what can it do
Everything that Rust can
>what doesn't it do
Everything that Rust doesn't
>how does it look
Exactly like Rust

Well user I don't want to use one language for front and backend so this thread is fucking asinine.

PHP and JavaScript, name a more iconic duo, fuck you

>I don't want to use one language for front and backend
y tho

There is no need for any other languages outside of ES7, golang, and c#. It's best we stop fooling around with the rest.

Rust but with much faster compilation times and better Windows and GUI support.

>ES7, golang, and c#

Why these three?

OP wasn't asking for the most perfect meme language

I really like Rust and want to learn it but I think I should do Python first. True or false?

>What can it do
Appear to be useful
>What doesn't it do
Anything useful
>How does it look
Like absolute dogshit, which hides the fact that it's useless. I would call it G++

>what can it do
Everything Perl 6 can
>what doesn't it do
Everything Perl 6 doesn't
>how does it look
Exactly like Perl 6

>ruby's syntax
>C's speed

wait, it already exi-

you'll have an easier time learning rust if you do haskell and C first, but at that point, you'll probably no longer care to learn it very much, other than for the memes

No such thing. No one language can cover every use case.

Now a sensible question (har har) would be what is the best language for each of following (add if field is not covered):
>Embedded / Microprocessor
>FPGA design
>Mathematical modelling
>Physics modelling
>Desktop application
>Web frontend
>Web backend
>Games
>CAD / 3D modelling
>Video processing
>Audio processing

>but I think I should do Python first

Definitely learn Python first.

Maybe even spend a few hours on C, pointers and manual memory management before beginning Rust.

Havent tried that many (js/php/ruby).
Really enjoyed ruby on rails, somethi g like that not built for blogs and with simpler hosting would be nice. Not having to mess around in sql, getting basic scaffolds to start from and having things 'just werk' to get started (then every project will run out in the sand anyway but at least the setup wasnt a pain)

C
you may not like it but this is what the peak of programming languages looks like

They all excel phenomenally (great resources to learn from, fantastic docs, behemoth support, reading and writing is beautiful and easy) and tackle different issues that all development fields benefit from. Although all 3 at once is overboard.

>OP wasn't asking for the most perfect meme language
just a reminder that any language that is not a safe-language for brainlets are meme languages

the brainlet safe list is:
C, C++, Python, PHP, Java, C#

anything not on the above list is a meme language

Easy, Common Lisp.

>>Embedded / Microprocessor
C
>>FPGA design
VHDL
>>Mathematical modelling
Fortran
>>Physics modelling
C
>>Desktop application
C
>>Web frontend
C emulator written in PooScript
>>Web backend
C
>>Games
C
>>CAD / 3D modelling
C
>>Video processing
C
>>Audio processing
C

I know C. Have fucked around with Haskell. Rust is cool because it's like a Haskell that you can actually do stuff with.

I will probably learn Python this winter and fuck with Rust next semester.

>BASH is a meme language now
I'm not sure how to feel about this.

>A language with nulls
opinion discarded

Zero cost abstraction, memory safe,concurrency safe,parallel, extensible, could build on it new DSL to any kind domine, high performance.

Some high advance math formalism could compile to high performance language.

Maybe another 30 years waiting...

>Embedded / Microprocessor
>FPGA design
clash-lang.org/
>Mathematical modelling
>Physics modelling
Haskell
>Desktop application
F#?
>Web frontend
Purescript, Elm, Haskell+GHCJS
>Web backend
yesodweb.com/
>Games
F# + .net game engines
>CAD / 3D modelling
github.com/colah/ImplicitCAD
>Audio processing
wiki.haskell.org/Applications_and_libraries/Music_and_sound#Libraries

>it's like a Haskell that you can actually do stuff with
have you checked out Idris?
idris-lang.org

It's able to do all the same things as rust and more, but with a less awkward syntax, and less imperative nonsense. Though it's performance isn't quite up to par with rust yet.

this is what functionalets actually believe

go back to your call center pajeet

The perfect language has a community as large as Python's, a syntax as easy as Ruby's, is as fast as C, as flexible as Perl, as extensible as Forth, as conceptually beautiful as Lisp, as powerful as C++, and as well-paid as COBOL.

It already exists.

...rust?

golang.org/

Replace VHDL with Verilog for the C-like syntax.

Replace Fortran with C and the numerical recipes book.

PERFECTION

>proprietary programming language

>yet

Will it ever? The project has less than 2000 stars on GitHub.

>implying rust or go have good communities, are extensible, beautiful or well-paid, or even have bearable syntaxes
No, fuck off and go learn how to program instead of shilling your shitty languages.

>>implying rust or go have good communities, are extensible, beautiful or well-paid, or even have bearable syntaxes
bullet points for every brainlet language

they do though
maybe you should learn a language instead of regurgitating myths from spam blogs

>if a language supports metaprogramming and is elegant, it's a brainlet language
End your life.
>they do
Show me how Go or Rust are as extensible in their syntax as Lisp.
Show me how many employers are requesting Go or Rust developers for well-paid jobs.
Show me how Go's community is anything but nonexistent outside the Google ecosystem, and how Rust's community is anything but insufferable.
>learn a language
I'm not interested in learning your shitty languages, m8

>>>Physics modelling
>C
No that's FORTRAN too.
>>>Web backend
>C
Oops I accidentally memcpy'd more than I should've :^).

It keeps the tards and Indians out.

>thinks performance is correlated with github stars
>nevermind that a lot of github darlings like ruby still have shit performance
the absolute state of Sup Forums

>>if a language supports metaprogramming and is elegant, it's a brainlet language
spouting meaningless buzzwords like (((elegant))), actually referring to templates as (((metaprogramming))) when there are algebraic data types, type classes, enums, options, etc

>Embedded / Microprocessor
C
>FPGA design
VHDL
>Mathematical modelling
FORTRAN
>Physics modelling
FORTRAN
>Desktop application
C++
>Web frontend
TypeScript -> JavaScript
>Web backend
C++/Scala/Java for performance critical use cases, Python/Ruby for when you need to push out a product fast.
>Games
C++
>CAD / 3D modelling
C++
>Video processing
C with performance libraries.
>Audio processing
C with performance libraries.

>actually referring to templates as (((metaprogramming)))
But I didn't, so shut the fuck up you braindead ape and learn how to read instead of putting parentheses around every word that sounds complicated.

>End your life.
>I'm not interested in learning your shitty languages, m8
I wonder if you realize how cringeworthy you are, so unaware of the fact he's projecting all of his self-anger at others he doesn't even know. I bet it's much easier to spend your time shitting on languages you know absolutely nothing about instead of coming to the realization you have still produced nothing of quality in the world.

>Embedded / Microprocessor
Isn't that where Forth shines? IIRC it's used for the most performance critical, important stuff.

>the realization you have still produced nothing of quality in the world.
Looks like you're the one who's projecting, faggot. Go shill your shit somewhere else, you still didn't back up anything you implied.

insufferable.
brainlet checklist for what makes a good language:
>Show me how Go or Rust are as extensible in their syntax as Lisp.
youre a larper, no one is going to use homiconic syntax, you are just propping up Lisp as a weak argument to shoot down modern langauges
>Show me how many employers are requesting Go or Rust developers for well-paid jobs.
classic babby duck reason for using a language, its what everyone else uses
>Show me how Go's community is anything but nonexistent outside the Google ecosystem, and how Rust's community is anything but
yes I get it, you need your Java/C# brainlet-safe ecosystem so you dont hurt yourself

rust but with more c-like keywords and syntax
let is pretty gay and ! should be reserved for NOT

>no one is going to use homiconic syntax
Says who, some unemployed neet?
>its what everyone uses
The most well paid languages aren't the most popular, brainlet.
>so you dont hurt yourself
Kill yourself you pretentious fuck. A language having a large community means more support and more libraries.

I'd like to have a nice systems programming language
C with generics and without header files
Linking built into the language, like declaring memory layouts

>>no one is going to use homiconic syntax
>Says who, some unemployed neet?
no you are, so is every basement dweller who bought into the Lisp koolaid thinking they could treat all data as a homoiconic Lisp

sorry kid, the Clojure hype died, everyone tried it, maybe 2% of the people who tried to apply Clojure to real world programming succeeded

>muh libraries
>muh ecosystem
you don't need 10000 libraries, every fucking bloated-ass program that uses more than a couple of libraries quickly becomes a pain in the ass to install, or worse, compile

>What can it do

Functions in the stdlib to shitpost on Sup Forums and write FizzBuzz and sum of all primes below 2,000,000.


>what doesn't it do

It's not compiled and not interpreted.
In fact the parser generates APL code which gets parsed by a Haskell interpreter written in Fortran and runs on a Erlang virtual machine.


>and how does it look?

The basic syntax is like a combination of Assembly, C and Lisp, but it's object oriented like Java. You have a garbage collector, but you have to tell it where to collect or it will produce memory leaks..


Here is an example:

010 EAX (malloc (10 (new (shitpost_genrator)))
020 (null? (shitpost_generator (GOTO 0040)))
030 (GOTO (050))
040 (die (finally (start (garbage_compiler.compile(new garbageCompiler()) shitpost_generator))))
050 (shitpost_generator.newThread("Sup Forums", "Imagine the perfect language")).run
060 EAX.syncronize 13, 123, 12312, 123, 535
070 (die (finally (start (garbage_compiler.compile(new garbageCompiler()) shitpost_generator))))

What do you think, will it fly?

why would you ever want this
syntax is one of the best parts of c and syntax is the worst part of ruby

Could you write this in C please?
I'm waiting..

puts (1..100).map { |i| i%3==0 ? "Fizz" : i }.reverse

>nulls
>plural
retard detected

The perfect programming language is C, a bit of Python and D without the C++ and some of Rust's build stuff.

That's literally the perfect language. You can't beat it.

thanks for proving my point
ugly as shit and confusing
c may take more lines, but at least it's human readable by someone who hasn't used c :)

>for (int i = 100; i > 0; --i) {
> if (i%3 == 0)
> puts("Fizz");
> else
> printf("%d\n", i);
>}

>A language having a large community means more support and more libraries.
the state of brainlet programming
>huur Im helpless without libraries to do any kind of complicated programming for me

t. wheel reinventer

You should concentrate on your problem domain, else you are wasting everyone's time.

>C's speed
yeah right

>>Desktop application
>C
no

>what can it do
Aspect Programming, Grammar declaration/parsing, natively
performant
>what doesn't it do
require lots of time for build/cache
require a heavy, bloated vm
>how does it look
C++, C#, python, PHP, javaSE
it shouldn't puts high requirement on project/syntax like javaEE

I imagine that a perfect programming language would be like a combination of C, Python, Haskell, Scheme and Rust.

Type safety of C, speed of Python, simple and uncomplicated syntax like Haskell, tons of libraries like Scheme and a great community like Rust's.

kek

>what doesn't it do
general recursion

see: [g][n]vi[m]

eh, for a moment I thought it was like Nim, in that it transpiles to plain C, allowing $yer_favourite_cc to perform the optimisation itself

mov instructions is all I need

not that guy but why not, with the right libraries?

C with vectors, classes, and simple inheritance. Don't need all that other shit..

Static typing
No pointer arithmetic
Bounds checking and all that safety
Prober struct and high level containers
Native string type
Compiled

A bit like C syntax, maybe like Go, but with an implicit simplicity instead of catering to the most novice users

Ok this thread kind of made me think.
Python is a Turing complete language.
C is a Turing complete language.
C can manipulate pointers.
Python can't
So is Python not turing complete??

You're not Turing complete. That's not how any of this works.

It looks like this.

As long as it's not Javascript, it's varying degrees of fine.

Syntax like python but also lets you do things like C++ if you want, is also very fast

So it doesn't compile?

> can do
higher order functions baked in
whitespace indentation rules ala python
pass object/struct keys as function arguments
automatic garbage collection
optional function parameters
errors contain their location in source and the data that caused the error
compile errors apply to dynamic data structures, and wont allow for dynamic data types to be passed or accessed without first being initialized
relatively high performance
data structures and functions are named according to their mathematical equivalent or their convention in a majority of other conventions aka map, filter, reduce all apply to functions and the 'map' data type is called either a HashMap, Dictionary, or KeyValueStore
forced code styling
basic assumptions about data types (numbers are ints unless otherwise specified, same for strings, funcs, vars)
functions return last line of output by default
piping
> doesnt do
raw sql queries, all queries must be parameterized
simplistic random number generation
basic functional datatypes
> how does it look
timesThree (x int -> int x * 3)
x * 3

[]int 1 2 3 | map timesThree

It already exists.
It's called native Julia.

>imagine C

Crystal is perfect.

Now take this and go.

based

ruby but fast and with proper support

it's basically D except other people actually use it

Nobody gives a shit about Crystal. Not even ruby programmers care enough to make it popular.

It’s turing complete in the sense that you could theoretically use python to create a language that allows you to manipulate pointers.

Syntax and community growth of python.
Speed of assembly.

Just allocate a big fucking array, now integers are pointers

>what can it do
It would be able to create bug-free programs.

>how would it look?
It would have a "codemp" instead of a compiler - a compiler and sophisticated decompiler. As such, it would be able to look like anything. You want significant white space? Done. Want braces? Done. Want to interpret the compiled code as if it were a C-like language? Done. Make it functional? Done. The only unique thing about it would be giving it names to create variables/methods/whatever out of, to help the decompiler work.

>what doesn't it do?
It wouldn't replace SQL. SQL is already perfect for what it does.

I think Rust hit practically all my checkboxes, but non-lexical lifetimes and other lifetime ergonomics need to land before the language itself can be really considered usable outside of hobby hacking. Along with that, faster compilation is an absolute necessity.

ML/Haskell-like syntax. Elm is fairly close to the optimal syntax if you ignore its lack of features.

Full Hindley-Milner type inference with HKT's, liquid types, and linear/uniqueness types. Language design focused on minimal verbosity and programmer productivity first, and after that on maximizing the power of type tetris. Using :t on a function in the REPL should tell you as much as possible about what it does.

Garbage collected, and just empathizes full immutability instead of using a borrow checker. But the GC and type system should be designed together, letting you use uniqueness types to avoid allocations. Writing non-allocating code should be possible without stuffing everything into the ST monad.

Multi-parameter typeclasses like Rust traits, but allowing HKT's. Default implementations as proposed in github.com/nox/rust-rfcs/blob/master/text/1210-impl-specialization.md .

And most importantly, a standard library designed for performance from the start. RRB/HAMT persistent vectors and hashmaps should be imported by the prelude and have the "nice" syntax sugar for collections as opposed to linked lists. Lazy linked lists should exist in the language though, with Purescript's a:b:c:d...:empty syntax that makes their structure as clear as possible. And unique arrays/hashmaps for any code that needs to keep track of its allocations. _All standard library functions should have their asymptotic performance explicitly documented._ Making your functional code fast should be as easy as possible.

IO monad available, but effectively implemented as a souped up ST monad using runstate on a value of the unique "world" type like in clean, which is the input of the main function. No compiler magic. Fully opt-in monads, as opposed to confusing beginners with do-notation before they know what a monad is. Monads should ideally be either called "computation expressions" as in F# since that is a more descriptive term for their use in FP.

Also, lazy lists marked as unique so that any cons has to be destroyed in order to get the reference to the next one, should be guarenteed to be nonallocating if the same is true for the values that they hold. sumOfInts here should be guarenteed to be optimized to O(1) memory:

sumOfInts n = let unique ints = iterate 1 (+1)
unique runningsums = scanl (+) 0 ints
in sumOfInts n = runningsums !! n


That would make it really easy to write lazy list code which is still nonallocating and cache-efficient.

So Crystal, with about 10 more years to mature, and at least one "killer app" to get people to start using it.

javascript with lisp syntax

It can be learned in literally half hour by a casual, runs as fast and flexible as C, but it's self instructive enough to allow the same casual to fix most of not all bugs without much practice.