[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1787347830847386.jpg (15 KB, 512x390)
15 KB JPG
just because people are too lazy to write code to deallocate the pointer jungle they allocated?
i cant see a single good argument for why it should be allowed
>>
it's because JS is a language used in web browsers and like html, it must be forgiving.
It's to prevent browsers from leaking memory from visiting websites.
>>
>>109772778
>it must be forgiving
Nope. There was no necessity for it, it was simply invented back when people thought more convienent to use = technologically better in every way.
>>
>>109772778
if i open any modern corpo site like IG on the main home page and scroll a bit i very quickly hit 30GB+ per tab, happened to me today the whole computer froze for a few mins until it crashed
>>
>>109772599
We want to be productive, not spend time and add extra code pollution on silly things such as deallocating memory. Only heavily bullied autistic retards care about such low-level solved-problem stuff.
>>
>>109773363
>what is RAII
>>
>>109775101
>open file
>close file
I shouldn't have to do either of these. Procedural thinkers are so fucking dumb.
>>
>>109772599
the continent of india women and lazy researchers
>>
>>109772778
Web shouldn't have scripting at all.
>>
>>109773363
>productive
The vaguest word ever that basically means “let me write spaghetti code and goon for the rest of the day” this is why no one cares about writing responsible code anymore
>>
>>109773363
>code pollution
>}
>>
>>109772599
Imagine the state of our world if we had the same amount of software but so many more memory leaks and zombie pointers...
>>
>>109773363
updooter spotted
>>
what difference does it make? if you want to be explicit about deallocation in a gc language, you can usually invoke the gc yourself. if you're consistent about it, it will only ever have one thing to collect, which is the thing you just freed.
>>
File: 1785267716767478.jpg (20 KB, 317x432)
20 KB JPG
>>109776439
>>109776301
less slopware
more gatekeeping
>>
>>109772599
>just because people are too lazy to write code to deallocate the pointer jungle they allocated?
You don't even need that. ;)
>>
>>109775988
Anon, the biggest spaghetti codes in the world are written around memory-allocating retardation. Also, handling and hunting down bugs with memory is one of the most time-wasting activities. Go check game development.

Furthermore, I code Lua. I don't even need to know what memory is. Shit works, shit is fast, shit is high quality, and shit never breaks.
>>
File: 1782329995589210.jpg (28 KB, 310x310)
28 KB JPG
>>109776404
You need to fix your spotting code. May I suggest you to double-check your memory allocation, anon-kun.
>>
>>109776524
skid
>>
>>109772599
>>109776497
frognigs

>Verification: not required.
>>
File: 1778328246967183.png (506 KB, 944x746)
506 KB PNG
>>109776583
frogs won
>>
>>109776599
frognigs
>>
>>109776497
>Didn't understand the premise at all
Good job! This is great bait!
>>
>>109772599
Because people would rather focus on writing the actual program logic. That's the thing the customer actually cares about.
>>
File: 1776756541655752.png (582 KB, 1024x908)
582 KB PNG
>>109776608
kek
>>109776599
dubs btw
>>
>>109776616
an end user who can't compile your program themselves and modify source code as needed shouldn't be using a computer. idk like write apps for them or idc honestly
>>
>>109772599
>i have never programmed any real-life complex software, and i'm also oblivious to concurrent, precise, state-of-the art garbage collection. Because i'm a fucking ignorant.
kek
collect yourself
>>
>>109776722
software is supposed to be simple you trog
>>
>>109776757
Well, garbage collectors make it simple.
>>
>>109776770
even simpler. so simple it's natural to write it without a gc.
>>
stop shitting up and obscuring things with features. just write clean well documented simple code that even the simplest of simpletons can understand what it does, how it does it, where and when how much memory is allocated and why.
you won't tho, because you are too stupid to write simple code.
>>
>>109775101
refcounting is a form a garbage collection
>>
File: binary-pressure.jpg (960 KB, 1408x768)
960 KB JPG
>>109772599
garbage collection is a nothingburger, it doesnt activate until there is a possibility one container points to another it contains, the other words, it is only for breaking cycles, cyclic references. otherwise it stays silent.

binary retards like Casey Moratorium and better bloated staticly threaded software know little about. you may unsubscribe from them now.

OOP and objects are superior. function is an object and object is a function of the future.

garbage collection may be easily turned on or off in very rare cases. like

gcOff();
doYourThing();
gcOn();

it can be activated explicitly, the count of "maybe" cycles can be checked, all in realtime. GC doesnt influence performance of the program. performance is influenced by call chain clusterfucks. just look into some old C codebases, something like **redacted**, its function call upon function call upon function call that is all caused by optionation. add runtime opcodes in there and youll get something like Python.
>>
>>109772599
>t. 1st cemester CS faggot
>>
File: C Chud.png (286 KB, 1059x929)
286 KB PNG
>>109772599
If you're running a company you have to optimize for the lowest common denominator you'll end up hiring and try to make them somewhat productive instead of destructive. That's why basically all language development is focused on mitigating retarded mistakes rather than giving more power to the programmer.
>>
>>109772922
>very quickly hit 30GB+ per tab
there's something wrong with your browser
>>
>>109772922
You can thank React for that. I'm no fan of JavaScript but these days it's decent enough, at least for browsers/frontend. The problem is all the retards inventing absolute dogshit frameworks that can melt your CPU to show you a button.
>>
Go is a GC language. It's fats enough and has low memory profile. Same for D. They're not perfect languages and sure, C or Rust are maybe faster and use less memory, but compared to like Ruby or Python they're fine. There's no reason to not use a non-GC language for 90% of the things. In fact it's preferable.
>>
>>109772922
>if i open any modern corpo site
There's your problem



[Advertise on 4chan]

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.