Language shapes the way we think and determines what we can think about

>language shapes the way we think and determines what we can think about
which programming language is best for encouraging me to write clean and elegant code?

Attached: v3v323v.gif (540x379, 1.46M)

ANSI C
all other answers are wrong.

i want to stick my dick into kaos' pooper

python

that’s a big yikes from me

Acceptable answer.

Who is this semen demon?

ML

C++ ironically
Lisp unironically

This. Also no C++ style comments

kek

Acceptable

this but unironically. it was specifically designed to encourage you to write clean and elegant code.

sarina valentina

¿Quién?

Javascript, unironically of course

Go

Moeta Kaoruko aka Kaos from Comic Girls.

It might be best to start with English.

Attached: 1535364974709.jpg (1920x1080, 208K)

Ruby or python
With ruby it's like physically impossible to write spaghetti code because you have 2 choices

1) Install a magic gem to do everything for you in 2 lines of code
2) use one of the stdlib magic methods to do it for you

t. never wrote a line of code in their life

regex

Thanks~

No code is going to hold your hand and teach you to be a better organizer.
The question you should be asking is "what language is the most forgiving for someone who is sloppy" or "what resources are there that help me understand syntax"

>stupid Sapir-Whorf believer
>conflating natural language with programming language ("I'm fluent in Javascript")
t. Ledditor

elegant is subjective

Attached: perl.png (259x374, 89K)

None of them. You can and probably will write bad code in any language. Clarify your thoughts and the code will be elegant afterwards.

What you should do is use a language that has an internal consistency to it. Golang, C, and scheme are my favorites.

Elixir


defmodule Drop do
def fall_velocity(planet, distance) when distance >= 0 do
gravity = case planet do
:earth -> 9.8
:moon -> 1.6
:mars -> 3.71
end
:math.sqrt(2 * gravity * distance)
end
end


If you run Drop.fall_velocity(:earth, 20)
It will first check if you have at least a non-negative number.
Then it will take the first input and find out which planet you're on, assigning a number to the 'gravity' variable using a case statement
Then it gets the square root of (2 * gravity * distance) to get the velocity. In this case the result should be 19.7989..

Simple easy and reusable code that can be imported and used in other modules.

Attached: 1537357861443.png (371x288, 80K)

>everytime you want to add a planet you have to go and change every single pattern matching expression instead of just having earth, moon, and mars inheriting from a ABC

very bad example
in c++ this is just

int fall_velocity (Planet& planet, int distance)
{
return sqrt(2 * planet.gravity * distance)
}

ANSI C is the only right answer.
Jow Forums thinks elegant code means elegant syntax, they're all brainlets.
Unless somebody is telling you to use ANSI C specifically (No C99 or some other bullshit) don't listen to them.
The answer is always ANSI C.

bash scripting

>>language shapes the way we think and determines what we can think about

Not really.

Honestly depends on how verbose you wanna be.

>C++
Both C & C++ are amazing however C++'s templating and native typedef'ing enables you to easily create types for things that you might need down the road but don't want to put in a fuckton of > angle brackets. With C you have to deal with a bunch of bullshit of continuously using #ifdefined #define #else #undef directives and it looks like a massive clusterfuck if you don't maintain a good project structure (extremely hard to do for massive projects). C++ also allows you to define namespaces so it's easier to keep track of project structure.

>C
C is an amazing language *IF* you take the time to properly make use of the pre-processor directives, you can simplify a bunch of stuff if you really need to and make your code seem far simpler than it is. That being said, it lacks a lot of things you'd expect from a functional language such as lambda statements and whatnot. It's probably overhyped a lot though by retards who haven't tried to use it for an actual project, but it is really great. Way smaller than C++ and Python and can be faster to learn if you're not constantly glowing in the dark.

>Python
Python is probably the best language for practicality as well as allowing you to be verbose with type hinting but at the same time being as minimal as you want. You'll definitely encounter a lot of really bad code, however it's an AMAZING language if you know what you're doing. It's very inuitive to use and great if you just want to write prototype code before spending hours debugging it in C so you know what's going on. You can integrate it with C/C++ however it's not as easy as I'd like it to be, but still great nonetheless. Zoomers will always overuse it in everything though and act as if it's the fastest language out there. It's slow as fuck compared to compiled language, but extremely quick for just codewriting.

scheme lisp

kek