[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Programming languages

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 50
Thread images: 8

File: download.jpg (9KB, 225x225px) Image search: [Google]
download.jpg
9KB, 225x225px
All right Kids
Ruby vs Javascript vs Python,which is the best?
>>
File: program.png (289KB, 604x1640px) Image search: [Google]
program.png
289KB, 604x1640px
>>8813180
>>>/g/tfo
>>
>>8813180
I like PHP + Javascript. I hate web orogramming because you have to know like 4 or 5 languages to make anything of decent value.
>>
>>8813193
>>Pulls out SQL
>>
>>8813180
python would be literally magnitudes better if it supported real for loops [code]for (int i = 0; i < n; i++)[/code] instead of being forced to use their shitty range function which forces you to to have the ceiling value be exclusive, and making your own range function would be idiotic especially if working with a team.
>>
>>8813210
>https://wiki.python.org/moin/WhileLoop

i=0
while i<n:
>....
>i++
>>
>>8813216
>while i < n
>a real FOR LOOP

Are you pretending to be retarded son? No shit there are work arounds to do the same thing, but it's drawn out, inelegant, and inconsistent with almost all other mainstream languages.
>>
>>8813220
Are you aware that you are arguing about the most trivial details that no one but you cares about ?
>>
>>8813222
Actually I made a statement in the thread and you are the one arguing about the trivial part.
>>
HTML
>>
>>8813228
nice try
now explain to me why it bothers you so much that you have to exclude the ceiling value.

Why should it be excluded anyway ? There needs to be consistency in the written code, having some loops with < and others with <= would make very error prone and difficult to check.
>>
>>8813234
nice try
And I understand you don't have a lot of programming experience saying that using < and <= is inconsistent, but that is very dumb. It is better to change < to <= than having to change the operand to +1 or -1.
>>
>>8813241
You don't have to "change an operand"
You iterate over a set of values that is consistent with the data you are treating. You must have a lot of programming inexperience to think that changing < for <= is a clever way to cope with the fact that you are treating different data.
>>
>>8813255
What are you even saying? Yes, you change the operand being compared to +1 or -1 to change the comparison signs from > to =>, this is bad practice, better to use the other comparison sign.

n = 10;
for (int i = 0; i <= n; i++)

n = 10;
for (int i = 0; i < n + 1)

are both the same
>>
>>8813281
and of course ; i++ in the second one, forgot it
>>
>>8813284
I'm saying things you would understand if you had basic knowledge of algorithmics.
>>
>>8813292
>I present you with proof you're wrong
>b- b- but i'm smarter than you!

That's one way to concede, wink wink friendo
>>
>>8813296
You must be a code monkey if you think you prove anything but your ignorance.

The question is, WHY would you need to change < for <= ?
The only reasonable answer is that in one case you are treating a problem, and in the other case you are treating a different problem. Why would you < for one problem and <= for another one ?
>>
Haskell
>>
Python is used by scientists and engineers sometimes. Ruby and Javascript are only for codemonkey web dev bullshit. So I'd say Python
>>
>>8813180
So two scripting langs and a hipster "code artisan" toy?
>>
Who is this retard trying to pick out the fucking dumbest shit to complain about?

>Boo hoo a fucking for loop is done differently and I'm too retarded to deal with it

Did you throw a temper tantrum when mommy wanted you to clean your room because it would be different?
>>
File: 1.jpg (37KB, 500x279px) Image search: [Google]
1.jpg
37KB, 500x279px
>>8813615
Holy shit m8 that's not how you deal with retards
>>
>>8813210
Use Python3 and stop whining.
Python is a good language, but its interpreter sucks.
>>
Ruby is nearly dead already. JavaScript works on a shit load of iot devices where other languages don't work. Languages are like tools. Would you turn a screw best with a screw driver or a blow torch? Always use the best tool for the job. It's very difficult to answer is one language better than another. But Python seems to have a lot of community and respect. JavaScript gets a bad rep because millions of bad coders use JavaScript to make garbage.
>>
>>8813184
lol, /sci/ jerks of over C++, but literally it is garbage. need low-level? use C. need OOP? use java or C#. need functional? rust, D.
actually D is pretty nice. it's like C++ without all the ugliness.
>>
>>8814059
>muh aesthetics
nobody cares. /sci/ actually values practicality in a language. go back to /g/ to do your meme fizzbuzzes in scheme.
>>
>>8814070
C++ is not a programming language, it's a giant clusterfuck of macros built over the C language. A real /sci user would at least require a programming language to have defined semantics.
>>
>CTRL+F
>FORTRAN
>0 Results
>>
>>8813180
Python for general stuff, javascript (node) for my web related needs and Java for OOP.
>>
>>8814348
the right answer.
every language has its strengths. (inb4 "not EVERY language)
>>
File: 1409782095193.gif (275KB, 245x150px) Image search: [Google]
1409782095193.gif
275KB, 245x150px
>>8813180
>comparing the three most shit meme tier languages
>>
>>8814780
Saying these are meme tier, is itself a meme. Also elitist snobbery. I know first-hand several researchers who use python daily. And javascript is the most widely used tool for (amongst other things) web purposes.

Your obvious lack of knowledge on this subject makes it perfectly clear that you are either a freshmen in high school or trolling.
>>
>>8814787
Just because they're popular doesn't mean they're good or that there aren't better options.
>>
>>8814792
The user groups converge on the tools that work well for their intended purposes. All languages have drawbacks, but you are painting yourself into a corner if that's how you look at them.

There will always be "better" options, but you have to evaluate them objectively; are they maintained, are they getting updated, how's the backwards compatibility etc. It's not just: "wtf this language is shit because the syntax is shit or whatever, and i don't what i'm talking about".

Using a multitude of programming languages is part of my job, and if I started talking like you do, I'd be sending my CV around within a week.
>>
>>8814801
If the other options are better, then they are better. Whats there to discuss?
>>
>>8814314
>/sci
Hi newfag.
>>
>>8814806
/g/ tier post, kiddo. "Better" options are "better" in the sense that people who program for the sake of programming think they have "more correct" syntax and they are not "considered harmful" or such things. Meanwhile, there are people that view programming as just a means to an end. They will choose languages that have relevant features, standard libraries, are stable, maintained, industry standard, etc.
>>
>>8814806
Of course, but you're making it out to be very simple, which it is not in reality. There are so many factors to take in to account.

I assume you mean when initially choosing a language to write something in. This is a very basic case. And so much simpler if your application is an isolated little snippet.

But what if your code has to work with already existing software, or code snippets. Then you have to choose to either run the code as-is, translate one or the other, or just write it in the existing language. There is a clear trade-off between these, and that's one thing you have to think about.

And whatever language you think is the best to use today, might not be a couple of months, or a year from now. And then you sit there with a shitload of code, in a sub-optimal language. With your reasoning step one would be to re-write the code in the new language.

This is sometimes a valid step to take, but only after very careful thought and analysis.

I'm guessing you're not at all involved in any kind of software development professionally, but you have to understand that it is not as easy and clear-cut as you make it out to be.
>>
>>8814780
this constipates the vegeta
>>
File: download.jpg (8KB, 233x216px) Image search: [Google]
download.jpg
8KB, 233x216px
>>8814059
>lol, /sci/ jerks of over C++

Because they probably learn C++ in their intro to programming for Engineers class, and think they are master programmers.

Literally the only reason to use C++ is when performance is critical. And if you are writing performance critical code, an experience C++ programmer should be doing it, not some Physics grad student.

Use Python, and find C++ backends, written by pros, for any serious numerical computing you need to do.
>>
does matlab count as a language
>>
>>8813304

>The question is, WHY would you need to change < for <= ?
>The only reasonable answer is

n-1
>>
File: Rlogo.png (32KB, 200x155px) Image search: [Google]
Rlogo.png
32KB, 200x155px
not the best by any means, but still deserves a mention
>>
>>8815444
>Literally the only reason to use C++ is when performance is critical.

Agreed but i would also agree it is the best language to teach the theory of computer science with. There arent too many smoke and mirrors to how it relates to actual computer engineering.

Albeit definitely not worth much more than a learning too and for efficiency's sake.
>>
>>8814059
You have literally no idea what each of those languages are used for.
>>
>this thread

B-but I like c++ :(
>>
File: 1491196164849.jpg (145KB, 454x595px) Image search: [Google]
1491196164849.jpg
145KB, 454x595px
>>8815627
Then use it, literally everything else is /g/ memes and /g/ knows it.
>>
>>8815627
The language you like, that's the language you should be using. Even if everybody else hates it.
Stop caring about what other people has to say about your language.
>>
>>8814059
C++ is good for when you want low level, but also abstractions without having to spell out literally everything. D seems nice, but it's not popular enough to really have much of a community.

>>8814314
The semantics of C++ are defined just as well as those of C.
Thread posts: 50
Thread images: 8


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.