[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

[Advertise on 4chan]


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


ITT: criticize a language you like
>no increment/decrement operators
>>
File: rust.png (42 KB, 1200x1200)
42 KB
42 KB PNG
>Trans community
>>
>my language
>too based
>>
>>83806268
Python's problems get much worse that it's lack of increment/decrement operators.
>>
mostly used by pajeets who always fuck it up
>>
ALWAYS do what /g/ hates.
>>
>>83806268
>C#
>IDE choices are limited
>>
>>83806268
>json and dictionaries share the same syntax
>can't modify a json like a dict without turning it into a dict first
>>
File: 22.jpg (103 KB, 600x400)
103 KB
103 KB JPG
>>83806566
forgot pic
>>
>>83806622
checked
>>
>>83806622
clever
>>
>>83806268
>C++
>inconsistent standard library
>>
>>83806268
How is this
x = y++

better than this?
x = y+1

>inb4 I want to do f(x++)
>>
>>83806556
shut the fuck up
>>
nothing
>>
>>83808318
x = y++
!=
x = y+1
>>
>>83806268
>no increment/decrement operators
Explain what's wrong with this.
>>
>>83806572
I'd really hate it if you killed yourself.
>>
>>83808318
>x = y++
This assigns the value of y to x, then increases y by 1
>x = ++y
This increases the value of y by 1, then assigns this value to x
>x = y+1
This assigns the value of y increased by 1 to x without altering y

So to answer your question: you can't really judge which is better without knowing the context in which they're being used.
>>
>>83808318
The bottom is actually much better because it doesn't have a hidden side effect.
>>
>>83806268
>ITT: criticize a language you like
>python
you have to go back wherever you came from mutt
>>
>>83806268
This is the absolute stupidest complaint. Just use var += 1 you dolt.

The far more relevant complaint is that maintaining any kind of globally accessible state, even if it's atomic and transactional, requires a class. Dataclasses are a shitty stand-in for actual records or just using a dictionary in many cases.
>>
File: 1631823716904.png (136 KB, 381x499)
136 KB
136 KB PNG
>>83806268
>Requires a large amount of work to do marginally complex tasks
>Completely reliant on OS implementations of it's std lib to be usable
>Will make you feel like a retard occasionally
>Knowing it makes your friends think you're an all knowing resource for every obscure issue related to it
>>
>>83809022
What, one small side effect and the universe implodes?
>>
>>83810941
It's not exactly small, the bottom one sets X to whatever Y would be if you added 1.
The top sets X to Y then increases the actual value stored in Y by 1.
This could completely change the logical operation you're performing and fuck everything up.
>>
File: F_Sharp_logo.svg.png (12 KB, 1200x1139)
12 KB
12 KB PNG
>>83806268
>no hkt
>async/await
>slow compiler
>tooling randomly breaks
>runs on a vm
>will always be C#'s bastard child
>>
>>83806609
what language is this?
>>
>>83806599
retard
>>
The regex module has different funtion argument order from all the others.

No easy way to import 3rd party libraries in an ad-hoc REPL.
>>
>>83806268
>folders need a mod.rs file to get exposed
Makes it a pain to try to open file with search cause you have multiple files called mod
>>
>>83806268
>no proper multithreading
>no operator functions
>no function overloading
>no optional static typing (I don't bother myself with typescript since it's not native and it doesn't use a C-like syntax to declare types)
Otherwise a great and well supported scripting language that got much better over the years, feels good to use it only in the way I want to and not be a seething wagecuck webdev stressed over 100+ frameworks
>>
>map/reduce/filter considered harmful, which sometimes forces one to write overly verbose and error-prone solutions
>no operator overloading, which makes it unusable for scientific computing and game development
>simple type system is often simplistic
>>
File: cover1.jpg (100 KB, 1339x753)
100 KB
100 KB JPG
>>83806268
> a $PROGRAMMING_LANGUAGE
> doesn't make me happy
>>
>>83811525
I don't think that's completely true.
IIRC you can have a structure like
module.rs
module/submodule.rs

Instead of
module/mod.rs
module/submodule.rs
>>
>>83812044
True, but then the use path becomes really ugly looking
>>
>>83806268
>Amounts of work increases exponentially with problem complexity
>Knowing it makes you look like a hermit
>Used only in embedded systems and/or for very specific optimizations, rest of the code is generally in C or C++
>By definition platform specific and hardware specific
>Even when it is the main language of the project (doesn't happen nowadays), C functions are used instead of proper syscalls
>How the fuck do you multithread with it
>>
File: 1615959212818.png (303 KB, 1977x1810)
303 KB
303 KB PNG
>No overloading of nonvirtual methods, makes unit testing hell and/or forces you to use interfaces for everything, even though 99% of interfaces will never get more than 1 implementation.
>No covariance for generics by default.
>No exhaustive pattern matching/switches on classes
>>
>>83810941
If I remove one hair from a man's head, does he go bald?
>>
>>83808318
These will not produce the same result.
>>
File: file.png (17 KB, 500x500)
17 KB
17 KB PNG
dont like it that much, but am most competent in it

>compile time generics
>only objects can be in generics
>generics in general, weaker than sepples even ignoring aforementioned stuff
>all methods are virtual
>everything is a fucking object, everything goes on heap except primitives, which have to have a separate streams because of how retarded java is with objects
>because everything is a fucking object and only objects go into generics, theres object type of primitives
>autoboxing for object primitives is sometimes retarded
>try and finally are separate scopes forcing you to write retarded code
i could probably go on but im craving mcnuggies
>>
File: 1626919714803.png (45 KB, 918x1032)
45 KB
45 KB PNG
>>83806268
>literally so much shit wrong with it that an entire book would not suffice
>>
>>83812430
>try and finally are separate scopes forcing you to write retarded code
How else would you do it? Variables in your try might not even be initialized because it threw before their declaration.
>>
>>83812430
>>everything is a fucking object, everything goes on heap
Modern JVMs use escape analysis and other tricks to detect when it’s safe to stack-allocate automagically. For example, if you create an object in a method and don’t return it then there is a strong possibility that it will never take up space on the heap (depending on a few other criteria).
>>
>slow
>no good IDE
>too flexible by providing too many ways of solving the same problem, which leads to code that nobody can read and understand
>seems like the hype around it has died off, which lead to a lot of articles popping up about the language being dead, which might be true
>>
>>83806268
Strings in C fucking suck dick.
>>
File: 1627402166283.jpg (384 KB, 1080x1349)
384 KB
384 KB JPG
>>83812467

I just had to write retarded code because the fucking boomer codebase im on doesn't have autoclosables implemented so I had to declare empty references above both scopes and initialize them inside try and then properly close them in finally

it would throw NPE inside finally anyway
>>83812493
which jvm's are that?
>>
>>83812430
>everything goes on heap except primitives
In a language with GC, there is no conceptual distinction between stack allocation and heap allocation from the programmer's perspective. Besides, as >>83812493 pointed out, implementations will in fact often allocate data on the stack if they can determine that it's better to do so.
>>
>>83811881
also dont forget about
>no private class variables
>oop is overall shitty
>multiple ways to do something but only one way properly does it (eg. timing functions, you have to use every instead of foreach to break out in case you want to)
>>
>>83806268
>R
>30 years of strange legacy decisions
>>
>>83811945
>>map/reduce/filter considered harmful
What's the reasoning?
>>
>>83806268
IDK, German is pretty intuitive but sometimes stupid, almost like you just are mushing words together like fucking Ubergroserschwanz(sorry for not using the proper characters), it is just shoving a bunch of words into one.
>>
>>83812639
probably too hard to understand for newbies. Go is all about being able to learn it and being productive in two weeks after you started at Google.
>>
>memory hell
>strings are so inefficient that for any actual complex task you need to import libraries to manipulate text with any amount of speed
>slow as balls
>no job oppurtunities on this face of the planet for it
>has potential to be beautiful but can easily become pure unreadable garbage if you aren't careful
you know the one im not even gonna bother with a picture
>>
>>83806268
Jeeze you could complain about actual problems. Like not having a valid switch case statement or do while loops.
>>
>>83812639
There is no reasoning beyond “Rob Pike thinks it’s bloat”. I’m being serious. He’s on the record saying that he has never seen an instance in his entire career where map/reduce/filter was clearer than imperative code.
>>
>>83812811
What about parallel map? Doing that with a for loop must be painful.
>>
>>83812811
>he has never seen an instance in his entire career where map/reduce/filter was clearer than imperative code
What the fuck, is he genuinely retarded?
y = x.Map(f);

is infinitely cleaner than
y = new List(x.length)
for(i = 0;i < x.length;i++){
y = f(x[i]);
}
>>
>C
No generics.

Nothing sucks quite as much as pushing into runtime that which should be compile time. The lack of good managed string types and an STL can be managed with a quasi-standardized library that is separate from the language. And the standard library should shrink IMO.
>>
File: haxe.png (9 KB, 200x200)
9 KB
9 KB PNG
>>83806268
>An Array is a collection of elements.
>A Vector is an optimized fixed-length collection of elements.
Coming from sepples, having arrays be dynamic by default still trips me up.
Also standard library is somewhat lacking, like ffs why isn't there a random next() in there.
>>
>>83806268
>variables aren't variable
Fucking why
>>
>>83812811
Assuming that map and filter return generators instead of newly allocated lists, making a generator of filtered/mapped values is way clearer with a dedicated function than manually writing it.
>>
>>83811881
>it doesn't use a C-like syntax to declare types
Absolutely filtered.
>>
File: 9387549082.jpg (62 KB, 1280x720)
62 KB
62 KB JPG
>>83806268
>/g/ thinks it's for retards
>I still struggle with it
>tfw I'm retarded
>>
>>83812605
>no private class variables
This is possible now
>>
>>83812639
they are in general slower than a for loop, at least thats his reasoning https://www.youtube.com/watch?v=rFejpH_tAHM&t=495s
thats a trend of go, when deciding between a complete solution and a simple solition, the creators went with the simple one
>>
>>83806268
the following does't work in Java and it pisses me off
try {
int a = 0;
} catch (Exception e) {return;}
a = 2; //error

You have to declare "int a" before the try-catch. It's so dumb, you never use try-catch blocks for logic so they shouldn't have separate scope like that.

>>83812430
you literally turned "java doesn't have value types" into 6 different objections.
and you also praise c++ templates which is the most destructive thing to ever happen to the c++ language and it's not even as powerful as the Java/C# version...
>>
>>83812871
Tell me what if I want to not apply f to all the members and say only apply it to the first 10 ? In the for loop I just change x.length to 10. With Map I have to learn about Limit (or Trim or Sublist or whatever it's called) and then add that.
What if I want to start from the second and go until the next to last? In the for loop I just change the 0 to 1 and do x.length - 1. With Map I have to learn about Drop (StartWith or Enumerate or whatever it's called) and add that as well as Limit.
What if I want to apply f1 when i%3 is 0, f2 when i%3 is 1 and f3 when i%3 is 2 ? With the for loop I add 3 ifs (or 2 ifs and 1 else) but I still have just one loop. With Map I have to learn about Filter then repeat the loop 3 times adding a Filter for each. The Map solution will be shorter but much less efficient.
What if I want to go through 3 lists at once? Off the top of my head I don't even know a solution with functional stuff (though I'm sure some autist will tell me about Zip3 or some crap) whereas with the for loop... you... just... do it. Simple no ?

Also in modern imperative you have
for(var xi : x) {
y = f(xi)
}
>>
>>83813770
C++ templates are so much more powerful its not even funny
>>
>>83814394
right, except for the part where they are compile-time so you can't do proper generics with them
>>
File: dog.jpg (17 KB, 400x400)
17 KB
17 KB JPG
> Makes you retarded and influences bad, unreadable code because of its untyped nature
If you program with Python using a Java mindset, it's much better.

Python btw but duplicate file
>>
File: haskell.png (5 KB, 250x176)
5 KB
5 KB PNG
>A monad is just a monoid in the category of endofunctors, what's the problem?
>>
/bin/bash
>spend entire work day on /g/ defending bash shell.
>eagle drops a rock with an oyster attached on the hood of my truck driving home.
>>
>>83814109
>I want to not apply f to all the members and say only apply it to the first 10 ?
x.Skip(10).Map(f);


>What if I want to start from the second and go until the next to last?
x[1:-1].Map(f);


>What if I want to apply f1 when i%3 is 0, f2 when i%3 is 1 and f3 when i%3 is 2 ?
If you need that you've failed to take advantage of language features that let you avoid that. Alternatively, you put those conditions in f and just use the normal Map() approach

>What if I want to go through 3 lists at once?
If you need to apply an imperative algorithm, you use imperative code. That's not hard to figure out, everything is a tradeoff and in the majority of cases functional programming is superior for list operations, though not always.

I fail to see how needing to learn syntax for functional programming is an argument against it - by that logic you have to be against all ways of doing anything in code, because noone is born with knowledge programming any language syntax.
>>
>>83814595
I misread your prompt; first one should be Take(10) not Skip(10)
>>
>>83812678
Ruby?
>>
>>83806268
I actually like python but even I can find more serious issues with it than the lack of increment/decrement ops
>>
>>83814595
the point of not needing to learn syntax is that you can spend more time on learning algorithms and what matters, not concise code. and there is a big difference between the minimalistic syntax of imperative vs the bloat of functional
Notice I gave like 6 different words for the Skip/Take functions but NONE of them were what you used lmao

I like using functional but it's really only useful for simplistic data processing where it's restrictiveness guarantees the code you are reading doesn't do anything weird.
>>
>>83814825
Not guy you replied too but I think in situations where the syntax allows you to be more efficient, it's worth learning it in the longrun
>>
>>83808781
Underrated
>>
>>83814825
I'm sorry you feel learning a few keywords is too much effort.
>>
>>83814109
Generally, you can do
zip [0..] to iterate over a list with indices
, which provides straightforward solutions to the first 3 problems. But this is not necessary for any of these exercises.
> Tell me what if I want to not apply f to all the members and say only apply it to the first 10 ?
import Control.Arrow
fuse = uncurry (<>)
mapfst f n = fuse . first (map f) . splitAt n
mapfst10 = flip mapfst 10

> What if I want to start from the second and go until the next to last?
mapInner f l = fuse . second (mapfst f (len-2)) $ splitAt 1 l where len = length l

> What if I want to apply f1 when i%3 is 0, f2 when i%3 is 1 and f3 when i%3 is 2 ?
This could not be easier:
map3 f1 f2 f3 = zipWith id (cycle [f1, f2, f3])

>What if I want to go through 3 lists at once?
Literally just use zip3. Easiest thing in the world. If that is too hard for you then you're ngmi
You can also write your own zip function if you're not a retard:
myZip l1 l2 l3
| l1 == [] = []
| l2 == [] = []
| l3 == [] = []
myZip (a:as) (b:bs) (c:cs) = (a,b,c):myZip as bs cs
>>
>>83814944
Jesus fucking christ haskelltranny, the point was to make functional LESS terse than imperative, not MORE.
Anyway pure functional programming is useless, but functional paradigms in OO/imperative languages are very powerful (Scala, C# LINQ, etc.)
>>
File: bnaaag he he.png (7 KB, 300x400)
7 KB
7 KB PNG
>>83814944
wow, I don't even need to reply wtf is that
>>
File: 1603310642912.gif (161 KB, 400x486)
161 KB
161 KB GIF
>the operator precedence order is pantsu-on-head retarded, just look at function pointers
>>
>>83814988
Solution 3 is without a doubt more terse than the imperative equivalent.
Solution 1 is expanded for the benefit of generality but is still more terse than the imperative equivalent.
Solution 2 is pretty ugly but STILL manages to be more terse and readable than the imperative equivalent:
A[] mapInner (Fn<A,A> f, A[] arr){
len = a.length;
A[] newarr = new A[len];
newarr[0] = A[0];
newarr[len-1] = A[len-1];
for (int i = 1; i < len - 1; i++) newarr[i] = f(A[i]);
return newarr;
}

Scala is more functional than imperative btw. C# is a pile of shit
>>
>>83815088
Why are you so bad at programming lmao
A[] mapInner (Fn<A,A> f, A[] arr){
for (int i = 1; i < arr.len; i++) yield return f(arr[i]);
}

wow that was hard
>>
File: clojure.png (89 KB, 1200x1200)
89 KB
89 KB PNG
>>83806268
>piggyback on the most hated runtimes
>lisp that doesn't encourage macro usage
>>
>>83806268
Assembly
> Need to constantly reference manuals because no one can keep the amount necessary in their head at once -- e.g. how to I comply with this calling convention again?
C
> all the pitfalls of assembly but somehow actually more complicated (Assembly just does what you say -- C has a lot of odd edge cases you always need to be aware of and keep in mind)
J / APL family
> don't program in it for a week, have to relearn from scratch
> don't work on a page of code for a day, have to write it from scratch
Smalltalk
> continues to fall behind
Lisp
> Libraries are getting old so have to rewrite significant portions of libraries to keep them working -- the Lisp community takes this for granted and expects everyone to do it themselves because it IS easy enough, but still, shouldn't have to do it.
>>
>>83815171
>lisp with syntax sugar
>>
>>83814860
>>83814941
This is the slippery slope that leads to C++.
If you want these specific additions, nothing prevents you from writing them yourself and using them where needed. And it can be done in a way that is implicitly understood by anyone. The code is self explanatory, seperated, and named appropriately.
With generic support being added to the compiler, people can't even complain about needing to target interfaces anymore.
You can compose data pipelines and even re-use their composition no different when wrapped, like you would in ones with built in map.

applyToFirst10(someInput, f)
looks the same in both types of languages. The only difference being the implementation using a single line builtin that generates several calls versus a 3 line for loop that just does the thing you asked with no additional features needed in the language.
You can reuse the code to the same degree. And now you don't even have to worry about taking the 2 seconds to change the function signature when you want to use it for a new type. (not that you had to before, but people don't know how to abstract I guess)
>>
>>83815167
If you don't want to keep the first and last elements then the Haskell solution is even simpler. It's just
mapInner = (. dropLast 1 . drop) . map
dropLast n = take =<< subtract n . length

In conclusion, Haskell chads stay winning
>>
>>83815597
>The only difference being the implementation using a single line builtin that generates several calls versus a 3 line for loop that just does the thing you asked with no additional features needed in the language.

The "builtins" you speak of are just library functions that you can easily define for yourself. The fact that they are functions has a bunch of other advantages, including searchability (with Hoogle), self-documentation (a typical base library function is 1 or 2 lines of easily-understandable Haskell) and composability (functions can be used in ways that builtin control structures cannot)

Your for loop, on the other hand, IS a language builtin.
>>
File: julia.png (3 KB, 181x151)
3 KB
3 KB PNG
>not enough people use it
>>
>>83806268
Not enough people know how great Wolfram Language is, mostly due to it being used as part of proprietary systems like Mathematica. Those that do have some exposure, are probably confused by it, because they were taught it by using a 'cheat sheet' for a couple days in one engineering class.
>>
>>83808318
Is this bait?
>>
>>83816449
No, I just had a retard moment.
The point still stands though, an assignment operation shouldn't change the variable on the right side.
>>
>javascript
>it made web tracking and bloated ads possible
>it made google and facebook the giants they are now
>i love how simple it is, how easy it is to start from the bottom, but damn its hard to not see the blood on its hands
>>
>>83806268
>using strict semantics requires too much work
>building and package management is still a mess
>large number of abandoned or low quality pakages
>strings are fucking LISTS of chars by default instead of some flavor of array
>>
>>83814988
>pure functional programming is useless
>source, my ass
>>
File: >λ=.png (679 KB, 10000x7339)
679 KB
679 KB PNG
>>83806268
>has no flaws
>>
>>83816763
>an assignment operation shouldn't change the variable on the right side
The assignment operation isn't what changes the variable on the right. It's the expression on the right which does that prior to being assigned.
>>
>>83817067
What was that quote about languages that people complain about and languages people use?
>>
>>83817079
>I'm so smart
Anon, I know how it works, I was talking about reasonable expectations.
>>
>>83817067
> 6 gorillion langauge extensions
> Can't infer numbers when you do clever stuff with typeclasses
> Shitty module system
> Sub-ideal type-level programming
> Hoogle not built in
> Overly small prelude
> Lenses inconvenient to use
> Can't generalize typeclasses over variably sized tuples
> Piles of legacy bloat (e.g. "return")
Haskell is vastly superior to most other languages but it's not perfect. Idris solves some of these problems but also has its own
>>
File: 1634165832755.jpg (29 KB, 504x198)
29 KB
29 KB JPG
doesn't make troons mad enough
>>
>>83817159
I don't know why you're getting egotistical with the "smart" remark.
You obviously don't know how it works, and what I said is what you can reasonably expect. It's consistent. An expression is an expression regardless of where you put it. The evaluation order is what it is.
Why are you being an asshole about it? God forbid someone try to help you understand.
>>
>>83817320
can't you read the op?
you need to like the language to be able to criticize the language
as you clearly dislike haskell, your (shitty) opinions become invalid
>>
>>83811111
holy fucking waste of a get, neck urself
>>
>>83811881
>I don't bother myself with typescript
>I could have if much better but <autistic nitpick>
>>
>>83817439
The fact that I can name several valid criticisms of Haskell doesn't mean that I hate it. Most languages (e.g.Java and Go) have far more flaws and far fewer strengths
>>
>>83806268
Rust
>still no GhostCell/fix that will make writing linked lists easier
>stdlib LinkedList isn't doubly linked

Java
>fucking Spring Boot

Swift
>only relevant in applel shit
Python
>the new match is a statement instead of an expression
>bloated as fuck with tons of redundant features
>weird object model

C
>unsafe, primitive, you can clearly tell it's old
>>83807142
C++ is a fucking mess. I can get liking what you're able to do with it, but to like the language itself you'd have to be insane
>>
>>83815597
this is a bit extreme. There has to be a LOOOOOT of fuck ups, bloat and legacy shit to go from Golang tier to C++ tier. There's a nice middle ground, and it's called Java.
>>
>>83812430
>>all methods are virtual
what's bad about this? I never got the point of having to explicitly make methods virtual
>>
>>83812457
even Bjarne agrees it's gotten out of hand and in his own words, "heading to disaster". That's why I really, really want Rust to succeed. Yes a lot of things about Rust aren't perfect, especially its community of larping webdev retards, but the shit we deal with in C++ is so much worse.
>>
>>83812637
you can tell it was designed by statisticians who had no clue about programming language theory
>>
>>83806268
C
precedence order is a little fucked up
>>
>>83814546
Based eagle
>>
>>83814546
autodesk always manages to ruin things
>>
>>83806268
> pic related
It's slow
>>
>>83806556
GIL
>>
JS
>wonky implicit typing
>the new retarded module system
>class as a keyword (functions are much better)
>>
>>83816142
>Wolfram Language
I love this language.
>>
File: 1357414719373.jpg (43 KB, 700x500)
43 KB
43 KB JPG
>>83806268
>Unicode and bytes incompatibility in 3.x
>for humans faggotry
>eternal September of webshits and poojeets
>GIL
>>
File: Erlang_logo.svg.png (43 KB, 1280x1122)
43 KB
43 KB PNG
>syntax
>>
>>83806268
That's a feature
>>
>/g/
>gets filtered by not knowing how to increment in Python
Holy fuck this board gets dumber every day
>>
>keyword lists should be largely replaced by maps and not have first-class language support
>charlists should be replaced by binaries and not have first-class language support
>the 2-arity forms of the get_in and put_in macros subvert typical language semantics and shouldn't exist
It inherited all of its worst problems from erlang
>>
>C
>Preprocessor is unnecessarily gimped
>>
>>83806268
>C
There's a bunch of little things that aren't in the language that one might expect. For instance, pass-by-reference. It's not a big deal, since pass-by-pointer works well enough. The lack of ways to expand and contract the size of arrays is annoying too.
>C++
Almost all C is syntactically correct C++, but just enough isn't that it makes me uncomfortable. For instance, type punning is different between C and C++.
>LaTeX
You have to run the compiler multiple times instead of just once, and you can't even separate it into distinct commands for a script.
>>83807142
This too. The standard library is a little fucked.
>>83810938
>Completely reliant on OS implementations of it's std lib to be usable
Isn't this technically true of most, if not all languages? Or are you talking about non-standard extensions to the standard library?
>>83812521
They're not that bad. As long as you know what the maximum possible length that you want to store is. If not, you're kinda fucked.
>>83819214
Yeah, it's not as good as it could be. At least it's not too hard to set up scripts to generate files that you can #include.
>>
>>83806268
I reached enlightening and now I do not "like"
any language. But I hate dynamically typed shit with floating variables a lot.
>>
>they thought this would actually be a good idea
>>
alright rust faggots explain how to implement this without resorting to while loops worthy of VB

for ($i=0;$i<count($a);$i++)
{
try {
// do something with $a[$i]
}catch ($e){
// retry
$i--;
}

}
>>
>>83808318
I want to do f(x++)
>>
>>83817699
sir, Rust's LinkedList is doubly linked. that's literally the description and you can check implementation.
>>83814517
>filtered by algebra
>>
>>83806268
>python
type system looks tackey atm. I also hate how python's context works, golang's defer looks terse in comparison.
>>
>>83821479
and why the fuck can't it change (delete, add) its members in O(1)? it's the whole point of a DLList
>>
>>83808318
Good bait
>>
>C++
>convoluted ways of doing some simple things, long compile times, build system is quite outdated
>>83817699
>I can get liking what you're able to do with it, but to like the language itself you'd have to be insane
very well put.
>>
>>83817979
This
>>
>>83809022
It's only hidden if you're retarded and doesn't even know the very basics about the language you're using.
>>
File: rustacean-flat-happy.png (32 KB, 1200x800)
32 KB
32 KB PNG
cisshits are allowed to use it
>>
>>83821949
But it does it in O(1), read descriptions.
>>
>>83813746
>they are in general slower than a for loop
He's wrong
https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/haskell-beats-C.pdf
>>
>>83822175
>The LinkedList allows pushing and popping elements at either end in constant time.
so no. You can't even insert elements in the middle of the list, only front and back like a deque. Compare to C++'s DLList https://en.cppreference.com/w/cpp/container/list/insert
insertions are O(1) everywhere unless you're inserting multiple elements or copies at the same time.
>>
>>83814109
>only apply f to the first 10
y = map f (take 10 x)

>start from the second and go until the next to last
y = map f (tail (init x))

>apply f1 when i%3 is 0, f2 when i%3 is 1 and f3
y = zipWith ($) (cycle [f1, f2, f3]) x

>want to go through 3 lists at once
y = zipWith3 f x1 x2 x3
>>
>>83821328
Something like
a.iter().for_each(|i|loop{

if success {break}
});

There’s probably a better way but I’m not a rustfag so I wouldn’t know
>>
>>83817796
See, Bjarne at least is honest about it. He recognizes that C++ has grown to be too large and complicated and he even regretted some design decisions.

What I really can't stand is C++ apologists who insist that the language is perfect and everyone who criticizes it is just an idiot who doesn't "get" it.
>>
>>83817699
>but to like the language itself you'd have to be insane
Guess what
>>
>>83806268
value++ is ok value+=1 is not
fuck you retard
>>
>>83812044
these are both really ugly. im not a go user but unironically go does it better. a folder is a package and the files in that folder make up the package. rather than the sometimes a file is a submodule and sometimes a folder is a submodule and sometimes the files in the folder are the submodule bullshit in rust
>>
>brazil
>>
File: IMG_20210922_113819.jpg (445 KB, 1080x1094)
445 KB
445 KB JPG
>>83822794
>Bjarne at least is honest about it.
It's always funny when people preach C++ over C (or vice versa) as if they were fundamentally distinct languages by design.
>>
>>83817796
rust strikes me as the worst kind of solution - the one that's only just barely tolerable, and through its existence inhibits work on a proper, desirable solution.

we shouldn't let the perfect be the enemy of the good, but we shouldn't settle for bad either.
>>
File: 1631955070390.png (4 KB, 496x403)
4 KB
4 KB PNG
>>83806268
would be cool if the standard library had more trivial convenience functions
>>
>>83817979
>>83821985
There are implementations without GIL, they suck and are slow af.
>>
>>83806515
rent free
>>
>>83823322
>t. ranny
>>
>>83823329
why are you guys so predictable
>>
>>83823378
why do you guys wanna kill yourselves
>>
>>83823384
I'm not a tranny lmao
I'm just finding it hilarious how easy it is to bait these days.
>>
File: 1024px-Ruby_logo.svg.png (166 KB, 1024x1024)
166 KB
166 KB PNG
No one uses it
>>
File: twitter_banner.png (42 KB, 1000x500)
42 KB
42 KB PNG
Cryptic documentation and out of date 3rd party libraries
>>
>>83823452
ywnbaw
>>
>>83817979
If you think a GIL impairs performance, you're in for a surprise.
>>
>>83819777
>LaTeX
Use latexmk, my fellow typesetter.
>>
>>83806268
>Python
>no multi-line comments
No, """""" is not a proper multi-line comment implementation. It is niggerlicious.
>>
File: no.gif (789 KB, 500x375)
789 KB
789 KB GIF
>>83821328
>i--
>>
>>83823504
you're an autistic robot who responds to trigger words

whatever, have a nice day and don't let the troons bite you, anon-kun~
>>
>>83823603
u2 tranny
>>
File: 1630923351439.png (10 KB, 256x256)
10 KB
10 KB PNG
>luarocks (the de-facto package manager) sucks ass
>>
File: 1634212299641.png (20 KB, 475x363)
20 KB
20 KB PNG
>nim
>style insensitive variables
>thing == THING == th_Ing
also nobody uses it
>>
>>83812678
Haskell
>>
>>83823530
Oh, I use rubber, but I still have to run it multiple times for sagetex.
>>
>>83816142
Really a shame Wolfram is such a jew. Wolfram could have been something if it were made open source 15 years ago, now it's too late - Python + numpy has taken over. The only language with a chance is Julia, thanks to being a bit better than python + numpy but still similar.
>>
>go
>it's too based
>>
>>83823262
also some functional style functions would be gucci, but I guess they will slowly but surely come with the generics after v1.18
>>
>>83824128
Julia will never win since it's JIT
>>
>>83806268
why is it slow as fuck, goddammit
>>
J is hard to understand so nobody uses it and those who would understand it are often elitist hipsters who instead use apl because it's less readable
>>
>>83824337
Remember that a large part of the go community are so braincucked that they think map is an advanced concept, and because go is "simple" it shouldn't exist.
>>
>>83817796
Fake Bjarne quotes are the worst feature of C++
>>
> C
You will constantly feel like an idiot whilst coding
>>
>>83806268
>C++
>Initializer list are part of the language, but to be used you must include a standard library header
>>
>>83812113
assembly?
>>
>>83812113
>How the fuck do you multithread with it
syscalls
>>
>>83823464
Why didnt Ruby ever get the popularity of Python? From what i understand its also pretty beginner friendly.
>>
>>83827316
Autism, basically.
Python's paradigm is a lot more friendly to people with Asperger's than Ruby's. Ruby supports and rewards horizontal thinking, and things become a real mess when you don't take advantage of it. Python punishes horizontal thinking, and is entirely set up to let you program C-style with utility classes.
>>
>>83826583
It's little things like these that show that, contrary to what Sepples fanboys believe, the standard library and the language itself are inseparable. They don't exist in a vacuum.
>>
>>83812113
>Amounts of work increases exponentially with problem complexity
My experience with Assembly is the opposite. As the project size/problem complexity increases, the amount of work and coding remains linear.
Why? Because an Assembly program basically does the same thing over and over again:
1. Get the data to where it needs to be.
2. Perform the algorithm.
3. Put the data back.
The simple what-you-code-is-what-you-get nature of Assembly is why it's my language of choice.
Now, what it does mean is I have to document a lot of stuff languages take care of for you with their features -- program design and structure, what it's doing, why it's doing what it's doing, etc. An assembly program I write probably has 10x the documentation of a C program I write.
(On the flip side, I find a C program is 10x the size of my assembly program (not in lines of code, but in terms of units of functionality), because I've got a lot of overhead to make sure things are done "the right way" and complies to a structured-programming approach, instead of ending up with Arthur Whitney-esque code).
Now, trying to write the Assembly itself in a maintainable way? I can see that causing exponential growth in the amount of work you have to do. But I don't try to maintain the assembly itself -- I just document things well and when something's broken, I can write a subprogram from scratch, change the documentation to describe the new behavior of the subprogram, and go on my merry way.
I know this works well for at least small teams of my own choosing (ie. less than 5 people). Not sure if this would scale well for larger teams, especially when you have to accommodate programmers that "don't get it".
But I'm also the sort of guy who enjoys APL and J.
>>
>>83823603
i agree with you anon
>>
>>83828840
>As the project size/problem complexity increases, the amount of work and coding remains linear.
That's because you're literally doing the same thing over and over again. But this isn't a plus, this kind of repetitive shit is the entire point of higher level languages.
You are just deluding yourself into thinking you're getting anything remotely relevant done when you're just a human compiler.
>>
>>83828840
What retard actually programs in assembly?
Wow. You fell for the /g/ meme so hard.
>>
>>83830295
Over time you develop a mental library of how things are done, you eventually memorize various idioms, and write your own libraries. In this regard, it's not that different from C, and you can even use a libc or c libraries in general.
Eventually you realize algol-style languages offer little benefit over Assembly other than taking common assembly idioms and standardizing them as if/else, while/for, etc. and expanding labels to me a more integrated part of the language.
Most of the time spent programming is trying to figure out what to do and how to do it, and general program design, rather than writing the exact code. So writing assembly really doesn't really create any additional overhead over higher level languages.
However, higher level languages DO create more overhead, because you can't just do what you want -- you need to comply with the language's specification, which at times becomes seriously a huge headache.

Probably the pitfall of assembly is that it doesn't scale to teams well. The more programmers you have, the easier shit gets fucked up, and the more standardization and rules you have, the better programmers work together. This is why languages like Go, which was designed to be used by teams of hundreds of programmers, tend to use very discrete and specific language, and offer little flexibility. Or Java, with all of its boilerplate overhead, necessary to enforce different programmers to adhere to the same concepts.
>>
>>83808426
Perl's only ever read by the clinically insane.
>>
>>83823139
> but we shouldn't settle for bad either.
Rust isn't bad (yet)
>>
>>83823262
my biggest problem with Go is that its growth suddenly stagnated for no apparent reason, despite having Google and Alibaba's backing
>>
>>83826161
>Fake
https://www.stroustrup.com/P0977-remember-the-vasa.pdf
>>
>>83811945
>no operator overloading
how is this bad
>>
>>83812897
why the fuck did they call wrapper classes Abstracts? That threw me for ages.
Also no native Set class.

Cool lang but has some weird design choices. I wish there was a bit more "why this was done this way" in the docs.
>>
File: honcc.jpg (48 KB, 600x508)
48 KB
48 KB JPG
>>83832733
Yeah he said the language committee was making a mistake in their initial scoping for C++20, not the language is was going to implode. Hence fake quote.
>>
>>83832968
>We are on a path to disaster though enthusiasm and design-by-committee (or rather “design-bycommittees”).
>We need a reasonably coherent language that can be used by “ordinary programmers” whose
main concern is to ship great applications on time. We now have about 150 cooks; that’s not a good way to get a tasty and balanced meal.
>We are on the path to something that could destroy C++. We must get off that path!

Guess what has changed since he published that paper? Absolutely nothing.
>>
>>83806268
>C#
>no WinForms equivalent for Linux
>no Visual Studio for Linux
I just wanted an easy way to make comfy desktop programs like with Winforms Designer in Visual Studio.
>>
>>83823487
I don't think the documentations is that bad, you should see Godot's.
>>
File: swipl.png (18 KB, 170x140)
18 KB
18 KB PNG
type system is not strong
>>
>>83808426
it has a fucking camel as mascot
>>
>>83813053
Look at it this way: If you don't struggle with programming in general, you're not even aware of how bad you are. Programming is *hard*. Don't give up. You only get better with practice. I'm at 28 years of experience. I can often write programs correctly on the first try, but I also often run into absolutely retarded gotchas that I have no one but myself to blame for.
>>
>>83823978
they should stick to only one style, imo
>also nobody uses it
it's a new language, give it some time to grow
>>
>>83811945
>>no operator overloading, which makes it unusable for scientific computing and game development
what the fuck? from what i've seen game devs absolutely HATE operator overloading



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.