Sign in to follow this  
dsm1891

FastCall Is Alll

Recommended Posts

The true horror though is that a lot of these already *have* alternative tokens:

http://en.cppreference.com/w/cpp/language/operator_alternative


I tried some of these alternitives but it failed to compile (VS9)
You have to disable microsofts language extensions...
https://msdn.microsoft.com/en-us/library/34h23df8.aspx#sectionToggle9
https://msdn.microsoft.com/en-us/library/0k0w269d.aspx

Share this post


Link to post
Share on other sites

 

 

The true horror though is that a lot of these already *have* alternative tokens:

http://en.cppreference.com/w/cpp/language/operator_alternative


I tried some of these alternitives but it failed to compile (VS9)
You have to disable microsofts language extensions...
https://msdn.microsoft.com/en-us/library/34h23df8.aspx#sectionToggle9
https://msdn.microsoft.com/en-us/library/0k0w269d.aspx

 

ah thanks

now I can destroy my codebase :)

Share this post


Link to post
Share on other sites

 

Why...Why all the defines?


He's trying to force c to look like another language. I've seen a couple new c programmers back in college try to make c work like lua. The professor was not amused.

 

 

One of my professors 'taught' us C by saying "C is like Java, and you all know Java, therefore you know C", and he was then surprised when he got back some mind-numbingly horrible code. (Mainly from students who had English as their second language, and this was a prof with a really think east European accent. Fun times.)

Share this post


Link to post
Share on other sites

The true horror though is that a lot of these already *have* alternative tokens:

http://en.cppreference.com/w/cpp/language/operator_alternative

 

What is the purpose in all of that? What reason would anyone have to type "<%" or "??<" instead of '{'. This made it into the standard, so there has to be a good reason.

Share this post


Link to post
Share on other sites

The true horror though is that a lot of these already *have* alternative tokens:http://en.cppreference.com/w/cpp/language/operator_alternative


What is the purpose in all of that? What reason would anyone have to type "<%" or "??<" instead of '{'. This made it into the standard, so there has to be a good reason.

To be able to use character encodings where some or all of these symbols do not exist (such as the German DIN 66003)


Pretty sure this is all legacy stuff thats just kindof still in the language for backwards compatability. Edited by slicer4ever

Share this post


Link to post
Share on other sites

The true horror though is that a lot of these already *have* alternative tokens:

http://en.cppreference.com/w/cpp/language/operator_alternative

 
What is the purpose in all of that? What reason would anyone have to type "<%" or "??<" instead of '{'. This made it into the standard, so there has to be a good reason.


Those funny looking characters are known as Trigraphs and exist because some of the characters used in the language were not typable on some keyboards or computers. (Much less of a problem these days, but a valid concern when they were invented)

Share this post


Link to post
Share on other sites

On some keyboard layouts some of those characters are still hard to type and can hurt the hands in the long term

 

Indeed...

On the swedish mac layout, both {} and [] is some kind of hand breaking 3-key combination, I tried to code using it for about 10 minutes, before I decided to just switch to english layout while coding.

That was an awesome decision I have never regretted, all of the "special" characters are so much easier to type.

I'm sure it even helped my productivity, not mainly because of typing speed, but less cognitive overload.

Edited by Olof Hedman

Share this post


Link to post
Share on other sites

Ouch, no wonder so many programmers I know are upset when they can't find English keyboards (although one could change the layout in the operating system in theory). I probably would not leave the Spanish layout though just because of how many symbols are present (especially for third and fourth level under Ubuntu, e.g. I can type ???? directly this way).

 

In Spanish { } [ ] are just two keys though (altgr + some key that happens to be above it). Three keys suck and should be reserved for uncommon symbols x_x;

Share this post


Link to post
Share on other sites

although one could change the layout in the operating system in theory

 

I just change the layout in the OS.

Both windows and OSX support quick-switching between several layouts, so I have both swedish and english configured, and switch as needed.

Who ever looks at the keyboard anyhow? Doesn't matter what markings it has smile.png

 

 

 


Three keys suck and should be reserved for uncommon symbols

 

Yeah, obviously not coders who decided that layout... Usually it doesn't even have markings for these chars! Had to google to find out :)

To be fair though, it is only the mac layout. On PC those chars are "only" two keys...

In a way, I thank them for the stupid layout, if it was better, I'd never gotten around to learning the (for programming) much superior english layout. smile.png (love how / [ ] ; \ is just one key, and others, like { } |, use shift instead of alt gr)

Edited by Olof Hedman

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this