Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Look Around You
Jan 19, 2009

Doc Hawkins posted:

I dunno about that. After all, here we are, reacting to it.

The line between branding and trolling can become quite thin in the celebrity-developer world.

I guess I'm just wondering if anyone who knows poo poo about development/CS/etc would ever want to hire someone this loving stupid. I don't even think anyone takes Joel Spolsky seriously anymore, other than that he helped found StackOverflow or whatever.

e:
Well anyone important anyway.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
There's another whole side of metaprogramming: C even has a side of this, since it has no OOP by default. You can still get a lot of work done right out of the box, though.

You don't have objects in C, but you can implement one. You can even get a little more advanced, and use more structures and function pointers to implement virtual methods.

This is a simplified version, but this sort of system is the core of GObject. Of course, it's a little more advanced than this, because all those static sub_object_class things that I create don't exist (we have a system called GType).

And of course GObjects have other things that modern OO environments have, like properties (which are somewhat of a mess to write right now, but people are working on it) and signals (the latter involving a whole generic "Variant" type called "GValue", and a marshaller system so that you can call function pointers with the right arguments).

There's a lot of cool tricks in GObject, some of them on the line between "awesome" and "horror", and if people are interested, I'll explain this stuff.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
If I were making this point, I would say that Lisp is not a language because it's really many languages that people have idiosyncratically invented at every place that deploys Lisp, which is furthermore all-too-often synonymous with having a home-rolled Lisp interpreter and runtime. That would be a fair critique of the wildly fragmented Lisp ecosystem, where moving from site to site often might as well involve picking up an entirely new language.

What he actually wrote is either badly mangled or open trolling of the Lisp community.

Look Around You
Jan 19, 2009

Suspicious Dish posted:

There's another whole side of metaprogramming: C even has a side of this, since it has no OOP by default. You can still get a lot of work done right out of the box, though.

You don't have objects in C, but you can implement one. You can even get a little more advanced, and use more structures and function pointers to implement virtual methods.

This is a simplified version, but this sort of system is the core of GObject. Of course, it's a little more advanced than this, because all those static sub_object_class things that I create don't exist (we have a system called GType).

And of course GObjects have other things that modern OO environments have, like properties (which are somewhat of a mess to write right now, but people are working on it) and signals (the latter involving a whole generic "Variant" type called "GValue", and a marshaller system so that you can call function pointers with the right arguments).

There's a lot of cool tricks in GObject, some of them on the line between "awesome" and "horror", and if people are interested, I'll explain this stuff.

I've browsed through the GObject documentation a bit but still don't entirely comprehend it all. It seems like a lot of it relies on how C requires structs to be laid out in memory though.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Look Around You posted:

I've browsed through the GObject documentation a bit but still don't entirely comprehend it all. It seems like a lot of it relies on how C requires structs to be laid out in memory though.

Very much so. The whole subclass casting thing relies on how things are laid out in memory. Here's a diagram:

code:
     BaseObject
+----==========-----+
| char *object_name |
+-------------------+

      SubObject
+-----=========-----+-------------------+
| BaseObject parent | char *description |
+-------------------+-------------------+
So, the struct BaseObject is the size of a pointer, because a struct is the size of its contents. The struct SubObject is the size of BaseObject, plus the size of a pointer. For the sake of simplicity, let's say that a pointer is 4 bytes.

If we have a SubObject *, it's saying that it's pointing to something that's 8 bytes long, and let's say, in memory, that's at 0x12340000. But since the structs are nested, there's also a valid BaseObject * at that location. Casting to a BaseObject * simply changes the pointer's size - it doesn't change the pointer's location at all.

So inheritance is done by nesting structs. As we nest, the structs cannot get any smaller, and because the parent class is always the first item in the struct (at offset 0), as we nest and nest, if you unfold out the structures, the base class is always at offset 0 in memory:

code:
     BaseObject
+----==========-----+
| char *object_name |
+-------------------+

                SubObject
+---------------====+====---------------+
| BaseObject parent | char *description |
+-------------------+-------------------+

                       SubSubObject
+----------------------============-----+----------------+
|           SubObject parent            | char *nickname |
+-------------------+-------------------+----------------|
So, ((BaseObject *)my_sub_sub_object) will always be correct.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Suspicious Dish posted:

Very much so. The whole subclass casting thing relies on how things are laid out in memory.

Doesn't C++ have the same implementation?

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

BonzoESC posted:

Doesn't C++ have the same implementation?

C++ has multiple inheritance, which automatically means it can't be quite that straightforward. It's a similar sort of design, though.

Look Around You
Jan 19, 2009

BonzoESC posted:

Doesn't C++ have the same implementation?

Yeah, multiple inheritance fucks poo poo up. I'm pretty sure GObject uses vtables though which I think most C++ compilers use for virtual functions.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Look Around You posted:

Yeah, multiple inheritance fucks poo poo up. I'm pretty sure GObject uses vtables though which I think most C++ compilers use for virtual functions.

Sort of. It puts vfunc declarations in the class structs, and has subclasses install their own overrides in the class_init.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
GObject: for when C++ just isn't complicated enough.

ToxicFrog
Apr 26, 2008


Look Around You posted:

What the gently caress is this poo poo? Like I honestly have no idea how he's saying that a turing complete language that's actually pretty powerful despite having a simple syntax isn't a language.

As far as I can understand, his argument is that any language that doesn't have a built in ____ (an object system, say), but instead has enough flexibility that users can roll their own ____, will result in everyone implementing their ____ a different way and this results in it not really being a language because :catdrugs:.

More generally he seems to be arguing that a programming language designed (or used) primarily for implementing DSLs is not actually a programming language, which is (a) crazy and (b) irrelevant because JavaScript isn't such a language anyways.

Plorkyeran posted:

Lua has syntax and features explicitly intended for prototype-based OOP.

Works pretty well for class-based OOP too, although that needs a bit more underlying code.

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


I may never forget the day our lead developer said "Why bother learning Javascript when you can just use JQuery?"

tef
May 30, 2004

-> some l-system crap ->
re: that loving blog

It's amazing how many words you can get out of No True Scotsman.

Opinion Haver
Apr 9, 2007

Doc Hawkins posted:

I may never forget the day our lead developer said "Why bother learning Javascript when you can just use JQuery?"

:stare:

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Doc Hawkins posted:

I may never forget the day our lead developer said "Why bother learning Javascript when you can just use JQuery?"

Sounds like a good policy.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

tef posted:

re: that loving blog

It's amazing how many words you can get out of No True Scotsman.

How is trainspottingland these days btw?

bobthecheese
Jun 7, 2006
Although I've never met Martha Stewart, I'll probably never birth her child.

musclecoder posted:

Could probably also use call_user_func_array() for slightly cleaner code.

php:
<?
call_user_func_array($editable_fields[$_POST['field']], array($_POST['value']));?>

That's what I ended up doing in the end. I'd forgotten about it until I needed to change another piece of code that called arbitrary functions with variable numbers of parameters (which I'd also set originally to use some 'exec' horror, only which an even more horrible function which flattened arrays into a string that looked like parameters to pass to a function. Ugh. I hate 4 years younger me)

Anyway, when I was looking up the half remembered "there's a way to do this 'properly'" I remembered that there was also a better way to call arbitrary functions.

All in all, the code is actually reasonably understandable now.

bobthecheese fucked around with this message at 15:33 on Jan 25, 2012

dancavallaro
Sep 10, 2006
My title sucks

rjmccall posted:

If I were making this point, I would say that Lisp is not a language because it's really many languages that people have idiosyncratically invented at every place that deploys Lisp

To get pedantic, Lisp is not a language because it's not a language, it's a family of languages.

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"

dancavallaro posted:

To get pedantic, Lisp is not a language because it's not a language, it's a family of languages.

Lisp isn't a language, it's a way of life, maaaan.

1337JiveTurkey
Feb 17, 2005

Getting started writing ReSTful Web Services with the ZWVP* platform. :suicide:

*z/OS, WebSphere AS, VSAM+CICS, PHP

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

1337JiveTurkey posted:

Getting started writing ReSTful Web Services with the ZWVP* platform. :suicide:

*z/OS, WebSphere AS, VSAM+CICS, PHP

At that point I'd just hang myself with my own underwear.

MrMoo
Sep 14, 2000

Using Java to integrate between PHP and COBOL, fricking awesome.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Two horrors I've encountered, both php based. I'm still getting my feet wet with php so I don't know how horrorful they really are.

First:
code:
If ($querystring_reviewid!='') 
 { show individual review } 
 else { show all reviews }
The problem? $querystring_reviewid is never assigned. This is the first time it's even mentioned. You see, a sane language might error out or log or something when that happens...

Second:
Not really code snippetable. This ecommerce setup has a review system, with random reviews being displayed on every page. The url generated if someone clicks on the random review is: review.php?refer=currentpage.php&review_id=y . The problem? The random reviews are also shown on the review page itself, and there's no sanity checking. So you end up with url's like: review.php?refer=review.php&review_id=5&review_id=10&review_id=30 and so on and so on in an infinitely recursive loop. The page itself renders fine regardless so it never 404s.

However, from an SEO perspective this situation is hot death. Several hundred thousand supposedly unique URLs indexed, that have the same content, description, and title? Sign me up Google!

The best part is, review.php was hosed up anyway, and would just show all reviews regardless of what was in the query string. Because the review_id variable was never set (see First problem).

PraxxisParadoX
Jan 24, 2004
bittah.com
Pillbug

Scaramouche posted:

Two horrors I've encountered, both php based. I'm still getting my feet wet with php so I don't know how horrorful they really are.

First:
code:
If ($querystring_reviewid!='') 
 { show individual review } 
 else { show all reviews }
The problem? $querystring_reviewid is never assigned. This is the first time it's even mentioned. You see, a sane language might error out or log or something when that happens...

Second:
Not really code snippetable. This ecommerce setup has a review system, with random reviews being displayed on every page. The url generated if someone clicks on the random review is: review.php?refer=currentpage.php&review_id=y . The problem? The random reviews are also shown on the review page itself, and there's no sanity checking. So you end up with url's like: review.php?refer=review.php&review_id=5&review_id=10&review_id=30 and so on and so on in an infinitely recursive loop. The page itself renders fine regardless so it never 404s.

However, from an SEO perspective this situation is hot death. Several hundred thousand supposedly unique URLs indexed, that have the same content, description, and title? Sign me up Google!

The best part is, review.php was hosed up anyway, and would just show all reviews regardless of what was in the query string. Because the review_id variable was never set (see First problem).

Turn up error reporting (error_reporting(E_ALL)) and it'll give you an Undefined variable notice.

nielsm
Jun 1, 2009



phpFreeChat.
It's an AJAX-based webchat thing, obviously with a PHP backend.
I don't know much about its internals, I just know that the version I'm exposed to doesn't work on IE9 unless you enable some compatibility modes.

They like dynamically generating stuff, so they make sure to dynamically generate stuff to dynamically generate more stuff.
In particular, the IE9 problem is caused by some (more or less) dynamically generated CSS not being inserted properly on the page. (It does work in IE8 or IE7 compatibility modes.)

How the CSS is supposed to be generated:
Some running JS dynamically fetches some PHP page.
Said PHP page dynamically generates some JS, which is eval()d by the fetching thing. (This is not JSON, it's straight JS.)
This dynamically generated JS contains a bunch of code that builds a hashmap of CSS selectors to CSS rules. (Nothing is dynamically built here, it's just plain strings.)
This hashmap is then iterated over and every key/value pair is fed into a class that uses DOM to insert singular text nodes in a dynamically inserted Style element in the head.

I wonder what's wrong with <link rel="stylesheet" type="text/css" href="whatever.php">.

It also makes extensive use of UA detection rather than feature detection.

Impotence
Nov 8, 2010
Lipstick Apathy

nielsm posted:

phpFreeChat.
It's an AJAX-based webchat thing, obviously with a PHP backend.
I don't know much about its internals, I just know that the version I'm exposed to doesn't work on IE9 unless you enable some compatibility modes.

They like dynamically generating stuff, so they make sure to dynamically generate stuff to dynamically generate more stuff.
In particular, the IE9 problem is caused by some (more or less) dynamically generated CSS not being inserted properly on the page. (It does work in IE8 or IE7 compatibility modes.)

How the CSS is supposed to be generated:
Some running JS dynamically fetches some PHP page.
Said PHP page dynamically generates some JS, which is eval()d by the fetching thing. (This is not JSON, it's straight JS.)
This dynamically generated JS contains a bunch of code that builds a hashmap of CSS selectors to CSS rules. (Nothing is dynamically built here, it's just plain strings.)
This hashmap is then iterated over and every key/value pair is fed into a class that uses DOM to insert singular text nodes in a dynamically inserted Style element in the head.

I wonder what's wrong with <link rel="stylesheet" type="text/css" href="whatever.php">.

It also makes extensive use of UA detection rather than feature detection.
You forgot about the hilarious security holes it has. XSS, CSRF, session hijacking, not sanitising certain data sent to everyone in chat...

Beef
Jul 26, 2004
edit: gently caress

Beef fucked around with this message at 18:59 on Jan 27, 2012

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


Probably, since:

Poop Delicatessen, four days ago posted:

Here's a lightning talk about why JavaScript sucks (and a few things about Ruby, too) that sheds more light on why JavaScript is an awful, awful language.

Lysandus
Jun 21, 2010
code:
if( phoneNumber.length() > 0 )
{
	if( phoneNumber != null )
	{
		doStuff();
	}
}
:psyduck:

Hibame
Feb 20, 2008
Working with a certain ASP based shopping cart has become a daily horror for me and my coworker.

First bug of today, customers can only change their email when it is forbidden:
code:
NewEmailAddressAllowed = Customer.NewEmailPassesDuplicationRules(EMailField, ThisCustomer.CustomerID, false);

if (NewEmailAddressAllowed || !emailisvalid)
{
   EMailField = ThisCustomer.EMail ; // reset their e-mail, but then update their account with other changes below
}
And to think that this shopping cart has the option to save credit cards under supposed pci compliance. :smithicide:

Hibame fucked around with this message at 08:52 on Jan 28, 2012

Zamujasa
Oct 27, 2010



Bread Liar

PraxxisParadoX posted:

Turn up error reporting (error_reporting(E_ALL)) and it'll give you an Undefined variable notice.

This is something you can argue either way; plain $variables should be initialized, but at the same time it basically means you have to wrap every single reference to a GPC variable with isset().

If there was a way to turn off undef notices for $_GET and friends I would constantly leave that error level on, since you're not meant to initialize those yourself.

Look Around You
Jan 19, 2009

edit: I'm a big huge retard who doesn't think before he posts when he's tired and poo poo

Mozilla is developing a new language called rust.

It seems to aim to be sort of C-ish but with new features kind of like Go I guess but unlike Go it's incredibly incohesive.

Interesting facts from their tutorial

  • Semicolons are required(except when they're not!) -- by this I mean apparently there is a semantic difference between if true { 5 } and if true { 5; }. They are both expressions; the first version returns 5, while the second returns nil. Apparently someone decided that the presence or absence of a line terminator should decide whether or not the block returns a value or nil.

  • I can't tell if it's always like this or not but apparently local variables get type inference, but "global" constants don't, and thus are declared like this: const repeat: uint = 5u;. Maybe I'm dumb but this syntax is pretty unintuitive (especially with syntax highlighting as on their site). *

  • Nil is not written as nil; instead it is written as (). This works in a lisp-ish language but there's not even a concept of parenthesized lists in this language so it looks extremely out of place (I guess they wanted to simplify their grammar for functions without arguments maybe)

  • Macros/macro functions are specifically set off by a #. Example: std::io::println(#fmt("%s is %d", "the answer", 42));. This has potential but still strikes me as a bit awkward and unnecessarily leaking implementation details into code (why can't fmt just look like a plain function?).

  • An alt construct that implements pattern matching. Cryptic syntax included: 2 | 3 means 2 or 3 (makes sense), 4 to 10 (also is ok), _ is "default" (this is alright I guess but it looks like line noise). Also apparently an alt block that fails won't silently fall through. Instead it is designed to "blow up" according to the tutorial.

  • 3 types of pointers and 3 types of closures, all identified with different sigils (@/fn@ is a "boxed" pointer/closure; ~/fn~ is a "unique" pointer/closure (only one owner/reference allowed); */fn are "normal" pointers/closures

  • Strutures and vectors (their array types) are unique and immutable by default, which does not make much sense in a language trying to appeal as a systems-ish language.

It looks like it has some potential but it seems to have an identity crisis. It's trying to be a bit of everything but it doesn't seem to fit heavily in anything. Unsafe pointers, but a heavy functional emphasis. It's hard to tell exactly what they're getting at and in the end it just looks like a mash of line noise like perl. I guess my biggest issue is that in trying to make it look like C/C++ it really betrays it's highly functional nature. I just really don't know where they're going with it.

example from their standard library:
code:
/*
Function: merge_sort

Merge sort. Returns a new vector containing the sorted list.

Has worst case O(n log n) performance, best case O(n), but
is not space efficient. This is a stable sort.
*/
fn merge_sort<T: copy>(le: lteq<T>, v: [const T]) -> [T] {
    fn merge<T: copy>(le: lteq<T>, a: [T], b: [T]) -> [T] {
        let rs: [T] = [];
        let a_len: uint = len::<T>(a);
        let a_ix: uint = 0u;
        let b_len: uint = len::<T>(b);
        let b_ix: uint = 0u;
        while a_ix < a_len && b_ix < b_len {
            if le(a[a_ix], b[b_ix]) {
                rs += [a[a_ix]];
                a_ix += 1u;
            } else { rs += [b[b_ix]]; b_ix += 1u; }
        }
        rs += slice::<T>(a, a_ix, a_len);
        rs += slice::<T>(b, b_ix, b_len);
        ret rs;
    }
    let v_len: uint = len::<T>(v);
    if v_len == 0u { ret []; }
    if v_len == 1u { ret [v[0]]; }
    let mid: uint = v_len / 2u;
    let a: [T] = slice::<T>(v, 0u, mid);
    let b: [T] = slice::<T>(v, mid, v_len);
    ret merge::<T>(le, merge_sort::<T>(le, a), merge_sort::<T>(le, b));
}
* I get that it's var: type but var: type = number looks weird to me for some reason.

edit: Well after sleeping a few hours I realize that I guess () can be an empty tuple, which the language does have. I still stand by it being a bit of an abuse of notation though.

Look Around You fucked around with this message at 14:24 on Jan 28, 2012

Quebec Bagnet
Apr 28, 2009

mess with the honk
you get the bonk
Lipstick Apathy
What's that quote again about informally-specified, bug-ridden LISPs?

qntm
Jun 17, 2009
"Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp"?

shrughes
Oct 11, 2008

(call/cc call/cc)

Look Around You posted:

:post full of human horrors:

Advanced programming languages are advanced. All these features are reasonable.

  • Semicolons are required(except when they're not!) -- by this I mean apparently there is a semantic difference between if true { 5 } and if true { 5; }. They are both expressions; the first version returns 5, while the second returns nil. Apparently someone decided that the presence or absence of a line terminator should decide whether or not the block returns a value or nil.

This lets you write blocks that return nil without having to write an extra nil expression. Also this helps catch type errors, for example if one block was written to return nil while another does not. If you didn't have this feature then every if/then/else block would need extra nil statements, or a special case in the language. Do you notice how this feature does no harm to the user? And how you're bitching about it?

  • I can't tell if it's always like this or not but apparently local variables get type inference, but "global" constants don't, and thus are declared like this: const repeat: uint = 5u;. Maybe I'm dumb but this syntax is pretty unintuitive (especially with syntax highlighting as on their site). *

You think global constants shouldn't have their types explicitly declared? No. Rust is for writing correct programs, not wrong programs.

  • Nil is not written as nil; instead it is written as (). This works in a lisp-ish language but there's not even a concept of parenthesized lists in this language so it looks extremely out of place (I guess they wanted to simplify their grammar for functions without arguments maybe)

You're seriously bitching because they chose a different syntax instead of the keyword you might choose. Don't they have tuple types? They would have tuple types. This is probably consistent with that, the way they are in most functional languages. If you think this looks like a lisp-ish construction you need to learn Lisp and you also need to learn some other languages, because it is an obvious non-lisp construction.

  • Macros/macro functions are specifically set off by a #. Example: std::io::println(#fmt("%s is %d", "the answer", 42));. This has potential but still strikes me as a bit awkward and unnecessarily leaking implementation details into code (why can't fmt just look like a plain function?).

fmt can't be a plain function obviously because then it couldn't be statically typed, it would be a variadic function which is bad. Also you get the usual crap with the need for va_list versions of all your functions.

  • An alt construct that implements pattern matching. Cryptic syntax included: 2 | 3 means 2 or 3 (makes sense), 4 to 10 (also is ok), _ is "default" (this is alright I guess but it looks like line noise). Also apparently an alt block that fails won't silently fall through. Instead it is designed to "blow up" according to the tutorial.

You're saying that as if silently falling through would be a good thing. Which it is not. Crashing the program there is basically the only thing to do. In our C++ code every switch statement has a default case that calls a function unreachable() which prints a backtrace and crashes.

  • 3 types of pointers and 3 types of closures, all identified with different sigils (@/fn@ is a "boxed" pointer/closure; ~/fn~ is a "unique" pointer/closure (only one owner/reference allowed); */fn are "normal" pointers/closures

This is a good thing. It's called an advanced type system.

  • Strutures and vectors (their array types) are unique and immutable by default, which does not make much sense in a language trying to appeal as a systems-ish language.

Yes it does.

quote:

It looks like

It looks like you don't do systems programming and don't know what you're talking about.

MrMoo
Sep 14, 2000

I thought they would have gone with Vala if anything. Good to know alternative languages are always being investigated though.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

shrughes posted:

Also you get the usual crap with the need for va_list versions of all your functions.

This isn't a flaw in the concept of variadic functions, it's more a problem with how C handles them. It's quite fixable even without the foo/vfoo stuff if you're aware of the issue when you're actually designing the language.

tef
May 30, 2004

-> some l-system crap ->

Look Around You posted:

Mozilla is developing a new language called rust.

I like rust. The design seems to come from years of dealing with c++ programmers who think they know better.

quote:

unlike Go it's incredibly in cohesive.

Oh You! :allears: Does this mean go is cohesive?

quote:

I just really don't know where they're going with it.

memory & type safe systems programming. that thing you can't do in c++, c or most functional languages.

Look Around You
Jan 19, 2009

shrughes posted:

stuff making me look dumb
Yeah, those are all legit defences. A lot of this was a kneejerk reaction to looking at it at like 1:30-2am and being tired as hell and not thinking straight. Most of it is either personal preference or just not thinking things through (mostly just not thinking things through).

Especially the blowing up thing, I definitely didn't think that through at all.

Basically posting tired is stupid and makes you look stupid.

e:

tef posted:


I like rust. The design seems to come from years of dealing with c++ programmers who think they know better.


Oh You! Does this mean go is cohesive?


memory & type safe systems programming. that thing you can't do in c++, c or most functional languages.

Yeah I'm basically retarded and thought things through like not at all and ended up making an rear end out of myself posting like an idiot at 2 am.

Look Around You fucked around with this message at 14:21 on Jan 28, 2012

Adbot
ADBOT LOVES YOU

The1ManMoshPit
Apr 17, 2005

Look Around You posted:

Macros/macro functions are specifically set off by a #. Example: std::io::println(#fmt("%s is %d", "the answer", 42));. This has potential but still strikes me as a bit awkward and unnecessarily leaking implementation details into code (why can't fmt just look like a plain function?).

Somebody's never included <Windows.h> and had to deal with nonsense error messages while trying to compile calls to std::max and std::min, or while trying to declare enum Distance { NEAR, FAR }; only to find they have been boned by all the windows #defines.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply