So, given that every programming language seems to suck, what would your ideal programming language look like?
What features would it have? What syntax? What typing system? What standard library, if any? Would it have a garbage collector? Would memory management be manual or something like RAII, or a borrow checker?
Would it be focused on minimalism? Safety? Performance? Provability? Size?
Is it possible to make a sane, ideal programming language?
Technically the point of a programming language is to abstract the ISA below it. C was originally the one to do this and do it well for the time. Rust is now a better alternative for both speed and security. Rust has many features of C. Uses a similar to C syntax. And is a memory safe, garbage collector free, and easy to use type system. For performance you can inline either C or assembly as needed. Rust could use C standard libs and eventually rust standard libs when they are made.
The problem with rust arrises from parallesation. It can't handle RISC like arcitectures in the most performant manner. (yet?)
Xavier Sullivan
I really want to like Rust, but it's constantly changing and frankly, isn't mature yet. The community surrounding it and making decisions directly impacting the language aren't exactly savory either.
I don't want to turn this into a Rust vs X circlejerk.
Anthony Miller
It would look and function exactly like C.
Oliver Young
No, it'll suck one way or another. Then we'll make another language, which will also suck and so on. It's been going on for close to 70 years and that process recently shat rust and golang.
Bentley Richardson
But user, the sanest programming language already exists.
Benjamin Gomez
This. Dubs confirm /thread
John Richardson
sane programmers program in brainfuck
Carson Moore
C++ Why is this even a discussion?
Colton Jenkins
you forgot
Julian Perry
It's Javascript. Anyone who says otherwise is either LARPing or a pajeet
John Kelly
I like the idea of programming in C, but then as I'm doing it I ask myself why am I spending time writing 80 lines of code when I can do the same thing in Python in 2 lines.
Hunter Ward
C is like getting your dick sucked with a condom on. It feels pretty good, but it could feel so much better.
That image has convinced me, and I shall now use assembly in all my very relevant "hello world" applications.
Jordan Thomas
Universally supported platforms are overrated
Dylan Powell
That's a shitty excuse. God said that he would continue to scatter the people upon the earth. He said nothing of them having one language again.
Lincoln Hughes
To be fair, it shows how the libc and the size of the image hurt the startup time, something to consider if your writing a program that would be run repeatedly in a loop (ie.: in a shell loop).
Michael Gutierrez
you faggots just never quit do you? you poz up literally every thread that has to do with programming.
Kevin Lopez
Crappy compilation model, tons of undefined behaviour and a pretty horrid syntax for meta programming. Also, it sure as hell isn't easy to learn unless you love said undefined behaviour.
Eli Cox
redstone
Robert Hughes
Show us how easy is to write quicksort in haskell not that meme 2-liner, but real, iterative in-place quicksort which will have run time and memory footprint comparable to a proper implementation in C
Jason Williams
No.
The best option will be a combination of a simple easy to use scripting language where you don't need to care about safety and the like, and a very low level language like C where you have very high level of control over the data and there's no magical mumbo jumbo doing things for you.
There's already tons of options for the simple language such as Python, but there's no very good modern performance language.
Henry Foster
It's already there (Python 3), but implementing it in a way which will do fast speed and correctness proving will be unimaginably hard. And when language shifts the burden of optimization and correctness hints to the user (Rust), it of course makes it less ergonomic. You can't have both ergonomics and compiler doing maximum grunt work for free, implementation complexity is a major factor too. It's certainly possible to define an super duper ideal language but it will be almost impossible to implement, so it will be useless ultimately.
Gabriel Morris
Gee, can't argue with that.
AI-assisted compilation?
Tyler Nguyen
No God fucking no Jesus christ no Not as much as C Runtime yes, compile-time you've got to be fucking kidding me
Brandon Allen
No double equals operator, '=' is comparison in an expression and assignment outside of one No assignment in expressions Object oriented Dynamically typed Garbage collected Optional runtime error checking Optional type assurance in error checking mode Every function call silently passes a 'self' variable Compiled Copy operator All objects can have their members modified No private methods You can modify operator behaviour for any given object No brackets around statements Shortest reasonable names for stuff In place assignment for unary operations Global members are addressed via a global object No line ending or continuation character I'm already making this btw Rough example: obj tamagotchi{ fn new() { self.hunger=100 self.health=100 self.dead=false return self } fn feed() { if self.hunger
John Allen
You write it in C-- and use FFI. The meme solution isn't slow either, essentially (in machine language) it does the same thing as the iterative C one.
Ian Johnson
I would like a language that has Lisp's S-expression syntax, but the low-level facilities of a C-like language. Then all the cool high-level stuff could be built as macros on top of that low-level foundation and be part of the standard library. Make garbage collection optional, i.e. provide facilities so that one can allocate and de-allocate memory explicitly, provide the facilities so that the compiler can predict in advance when memory will be safe to release, and provide actual GC-managed memory.
Safety first, performance second, size third.
Daniel Reyes
I'm sorry friend, but that automatically makes it trash.
Please see yourself to the nearest disposal chamber.
Supposedly the TALOS II will allow for stuff like lisp machines.
Landon Adams
Enjoy your memory leaks and wasted programmer time :D
Logan Morris
Enjoy your java-tier performance and still memory leaks.
Christopher Perez
What does this mean concretely? I have never used a Lisp machine, not even an emulated one.
Memory leaks can still happen, except now you don't notice them because they are cleaned behind the scenes, but you pay a huge performance overhead.
Kayden Davis
see
Isaac Ward
C
Hunter Collins
Simple.
Gavin Allen
Good job, now you have to constantly second guess whether each line you write is going to parse as an expression or a statement. Almost as retarded as Rust's "trailing semicolon changes return value" rule
Robert Cox
But GC can often be faster than manual memory management
"Conclusion. The controversy over garbage collection’s performance impact has long overshadowed the software engineering benefit it provides. This paper introduces a tracing and simulation-based oracular memory manager. Using this framework, we execute a range of unaltered Java benchmarks using both garbage collection and explicit memory management. Comparing runtime, space consumption, and virtual memory footprints, we find that when space is plentiful, the runtime performance of garbage collection can be competitive with explicit memory management, and can even outperform it by up to 4%. We find that copying garbage collection can require six times the physical memory as the Lea or Kingsley allocators to provide comparable performance." cs.umass.edu/~emery/pubs/04-17.pdf
Yes, but they're far more unlikely.
Sebastian Rogers
...
Jace Murphy
protip: rust didn't invent this "retarded rule"
Lucas Morgan
x=1 //assignmentif x=1 //comparisonx=y=z //Assigning value of comparisonx=y y=z //Separate assignments Eek so much second guessing
David Wright
XD I know right? What an idiot!
Jacob Cox
Let me guess, you use C++.
Ryder Morris
...
Jack Parker
I forgot to add, it should at least require parentheses. Just x=y=z being that is awful.
Jason Myers
Actually I quite dislike C++ for it's inconsistency and syntax, I only use C++ when I really have to (like when contributing to an open source C++ project). I much prefer C.
Jonathan Long
Nah, that'd introduce an inconsistency unless I made people do that for every comparative operator, and that would be even more annoying, I'd rather just leave it up to the user
Jaxon Watson
What would if x=y=z do? if (x=y)=z or if x=(y=z)? I know it's pointless but I've seen way too many times people doing if(x == true), so I'm curious.
Evan Collins
this sure is innovative
Brandon James
the only thing wrong with C was pointers C++ was made to avoid using pointers,,, to make it more practical for large projects. not to make it faster or smaller file size
if you want maximum speed + minimum file size, you use assembly
do yourself a favor and stop wasting time bothering with horse-shit trendy languages (or the even sillier "Imma make my own language that is BETTER!!!")
---------
some of you guise are like that faggot in the movie, standing on the front of the Titanic, yelling "LINUX AND RUST ARE GONNA RULE THE WOOOORRRRLLDD!!!" and it isn't going to happen. Windows and C++ is the iceberg
Kevin Sullivan
He's paid by mozilla. The basis of memes, repeat until someone believes it.
Thomas Hughes
It would do x=(y=z)
Jackson Wright
Windows is melting fast and C++ won't be prominent for another decade.
Nathan Taylor
You can build a bloated standard library if you want.
What's wrong with pointers?
Joshua Sanders
rust didn't invent much of anything, did it? It's the PHP of Ada wannabes, full of shit the designers don't understand but throw in because it "looks cool".
v=w=x=y=z
Wyatt Evans
Have you ever heard of fucking java? Call me pajeet but it's ideal as a language can be.
Oliver King
so? is this supposed to be an argument?
Ryder Nelson
v is set to the value of comparing w,x,y and z with each other here
Andrew Cruz
The design philosophy would be "it it doesn't run/compile/gives a warning it's the language's fault"
Just think of the possibilities. You wouldn't ever need to worry about spell-checking your code again. You wouldn't ever need to worry about stray semicolons. You wouldn't ever need to worry about, well, anything. Just think of how many pajeets you could hand a 10-minute youtube tutorial and then replace C++ programmers with decades of experience for $3 an hour.
Nathan King
...
Cooper Nelson
HAHAHAHAHAHA
Levi Gutierrez
I'm a C++ programmer and have been doing it for nearly 30 years. I've only once had to use valgrind to find a leak (and it wasn't in my code) as I do everything with RAII. Git gud, faggot.
Nathan Martin
CANCER
Cooper Ramirez
lol kys grandpa
Brandon Scott
...
Zachary Barnes
How could you then programmer an interpreter for your language in your language?
Josiah Taylor
You are retarded. Pointers are perfect for what they do. You should be careful though, as C assumes you know what you're doing.
Definitely retarded. How would you program a desktop PC game with assembly? is there some way of doing it without spending months / years writing stupid subroutines?
Nolan White
You better hope I do. Your packets likely are going through it.
Carter Hill
you are not fooling anyone
Anthony Walker
Pointers are a mixed bag. Numerical folks used fortran instead of C for a very long time because of how aliasing made it impossible for C compilers to optimize as tightly as fortran compilers. They only abandoned it when they moved to CUDA. As a former assembly prorgammer, it's always frustrated me that there's no way to communicate to the compiler when I know there's no aliasing and instead I have to dick around with objdump whenever I need to make a really tight piece of code. 'restrict' helps a little but it's a band-aid on a gaping wound.
Luis Morgan
Test me. I do networking in Linux. If you've got questions no one's usually able to answer, go for it.
Hunter Rogers
...
Evan Phillips
Adorable.
Eli Lee
how do i poop without having to wipe? you know like dogs?
Jordan White
you claimed that you are hot shit. the burden of proof is you.
Elijah Long
what is network endianness? what is an octet?
Jose Lopez
Byte order and byte size. The eternal mistake of having designed internet for big endian..
Blake Stewart
what is a socket?
Landon Harris
That's not the only cancerous part.
What do you mean? Everything is implementation specific/undefined behavior.
Logan Lee
Representation of an open connection. Has buffers and locking, and the locking causes a lot of trouble. People writing UDP servers often run into an unexpected bottleneck where using the same receive socket (as you do for multiple 'connections' with UDP) from multiple threads kills performance. On other OSes the solution here is to tell the client to use a different port and create a new socket for it. On Linux, you can make use of the fact that sockets do a longest match similar to iptables and you can put multiple sockets on the same port.
Blake Russell
I know these and I've very little experience.
David Morgan
Don't you have any interesting questions? I can answer all sorts of deep and juicy things no one can normally answer.
Austin Kelly
Why aren't all of socket's functions their own system calls instead of needing to be accessed through the socket system call?
Xavier Reyes
It was an ancient UNIX decision that happened before I was alive but it's generally a pain in the ass to create a new system call as you not only need to reserve a slot for it (which is a pain in a patchy kernel like Linux as they don't reserve slots for anything outside of mainline, so you'll have to deal with patches causing conflicts requiring rebuilding your whole firmware) but you also need to add bindings so you aren't doing a raw _syscall(). It's much easier with setsockopt() as the interface doesn't have to change to be able to pass a different kind of message. I have a few custom messages as patches against the TCP stack to dump some internals we use to predict arrival time and it didn't require changing any API.
Grayson Lee
...
Connor Adams
C++ is meant to be generated if C is "high level assembly language" then C++ is "high level assembly language with more opcode/instructions shoved into it"
Hunter Brooks
All you should care about is correctitude unless you're making a heuristic algorithm.
Jaxson Howard
idiomatic haskell is NEVER fast. all the "as fast as C" benchmarks are written in some awful style to cheat and get optimized code, not the way a normal programmer would do it.
Jackson Ramirez
How does Ada perform compared to C?
Matthew Baker
REEEEEEEEEEEEEEEEEEEE
Adam Bell
basically SML without the autistic broken concept of a programming language being written in ASCII or utf8. t. guy who already half implemented this 3 years ago