Reputation
1,069
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
6 19
Newest
 Nice Answer
Impact
~242k people reached

  • 0 posts edited
  • 1 helpful flag
  • 208 votes cast
Dec
24
comment How to use a switch statement with enum efficiently?
@Tim Medora Thanks Tim. Let's say that the values would remain constant and the list will not grow.In such a scenario, I can use (London = 201, Frankfurt = 233, etc.), then how can I assign the flight no. once the user chooses the destination without using switch?
Dec
24
comment How to use a switch statement with enum efficiently?
And here Destination is simply an enum i.e. enum Destination {London, Frankfurt, Berlin}...right?
Dec
3
comment How did you pick up the art of solving real life problems? Can you shortcut the process?
@herby But OOP is not the only paradigm in the world of programming! C++ allows multiple inheritance that languages like SmallTalk and Java does not allow. You could be right about SmallTalk when it comes to learning OOP but what Soham is after is applying programming principles to solve real world problems.
Dec
3
comment How did you pick up the art of solving real life problems? Can you shortcut the process?
The first line of your answer sounds quite logical but don't you feel that studying so many different languages may deviate him from his pet language which is C++. Those you have mentioned are very good languages in terms of academic research but what what he is looking for is industrial grade work! SICP and MELT are great resources indeed. Thanks for sharing them.
Nov
30
comment What are the pros and cons of multiple inheritance?
@Yannis Rizos Thanks for the advice.
Nov
30
comment What are the pros and cons of multiple inheritance?
@Yannis Rizos How about Ruby? It also allows single inheritance only but again considered a purer than Java in terms of OOP.
Nov
30
comment What are the pros and cons of multiple inheritance?
The object-orientation movement was started in the days of SmallTalk. It is odd why language engineers were inclined to produce lesser pure OOP languages like C++ and Java. Why is that?
Nov
30
comment What are the pros and cons of multiple inheritance?
@ChrisF No it isn't a homework. It's curiosity...trust me! :-)
Nov
29
comment How faster is an 'if' construct compared to an immediate 'if' statement (IIF) and when should I use it?
@Yannis Rizos How can you say it is a library function? Do we have to import or include a specific library to use iif? Please explain
Nov
29
comment How faster is an 'if' construct compared to an immediate 'if' statement (IIF) and when should I use it?
@ammoQ So its all about simplicity and readability and nothing to do with speed.
Nov
29
comment How faster is an 'if' construct compared to an immediate 'if' statement (IIF) and when should I use it?
@Yannis Rizos@VladimirJovic It is in C,C++ and Java as well not just in VB. And there are other languages that offer this handy structure.