14 Replies - 2233 Views - Last Post: 21 April 2011 - 08:48 PM

#1 creativecoding   User is offline

  • Hash != Encryption
  • member icon


Reputation: 931
  • View blog
  • Posts: 3,216
  • Joined: 19-January 10

Mixing lanuages

Post icon  Posted 20 April 2011 - 07:54 AM

Have you guys ever found yourself mixing languages while mindlessly coding? I do this when switching from php to java a lot.
Is This A Good Question/Topic? 2
  • +

Replies To: Mixing lanuages

#2 Shane Hudson   User is offline

  • D.I.C Technophile
  • member icon

Reputation: 345
  • View blog
  • Posts: 1,286
  • Joined: 06-December 09

Re: Mixing lanuages

Posted 20 April 2011 - 08:07 AM

Actually, quite the contrary. I can go between languages (even those really close like C# and Java) and not mix them at all. I have always found it a bit strange, because they are SO similar, I do not even need to think about what language I am writing 90% of the time.
Was This Post Helpful? 0
  • +
  • -

#3 lordofduct   User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2668
  • View blog
  • Posts: 4,786
  • Joined: 24-September 10

Re: Mixing lanuages

Posted 20 April 2011 - 08:36 AM

I tend to do fairly well at not mixing.

But a couple weeks ago I was making a joke because I was working from home that day. See when I'm at home I tend to write tons of C-Like langauges: C#, C++, Java, AS3. At work we write BASIC dialects: VB.Net, VB6, PickBASIC/FlashBASIC. I move back and forth seamlessly between the two when I go to and get off work. Yet when I worked from home that one day I kept slipping C style stuff into my BASIC, it was as if my brain was like "you're at home writing .Net, so you must be writing in C#".

This post has been edited by lordofduct: 20 April 2011 - 08:37 AM

Was This Post Helpful? 1
  • +
  • -

#4 AdamSpeight2008   User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: Mixing lanuages

Posted 20 April 2011 - 08:47 AM

When roughing out code, I tend to use a mixture of VB.net,c# and Nemerle.

Public Function SomeName<T>( T * Int -> String ) As String

VB.net Class Structure and Conditionals
C# Generic Typing and Lambda Syntax
Nemerle Delegate Type Signatures. Example would be Func(Of T, Int, String)

This post has been edited by AdamSpeight2008: 20 April 2011 - 08:47 AM

Was This Post Helpful? 1
  • +
  • -

#5 lordofduct   User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2668
  • View blog
  • Posts: 4,786
  • Joined: 24-September 10

Re: Mixing lanuages

Posted 20 April 2011 - 09:26 AM

I have a psuedo-code style as well, different syntax though. Not sure what you'd say it is... though you can probably see different languages stirred around in there.

Example:

modifier SomeClass
  modifier: //only placed if this group is NOT public
      o-SomeProp:int
      <-event SomeEvent(...)
      <-delg SomeDelegate(...):T
      ->SomeMethod(arg0:int, arg1:int, ...):int
          return arg0 * arg1 * ... //if maybe I want to show some implementation


This post has been edited by lordofduct: 20 April 2011 - 09:30 AM

Was This Post Helpful? 0
  • +
  • -

#6 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1402
  • View blog
  • Posts: 4,242
  • Joined: 12-May 09

Re: Mixing lanuages

Posted 20 April 2011 - 10:16 AM

I just pseudo-code in Ruby. I do often forget semicolons and return types in Java if I've been out long enough.
Was This Post Helpful? 0
  • +
  • -

#7 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5106
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Mixing lanuages

Posted 20 April 2011 - 12:28 PM

Worst for me is if I'm going back and forth from C# to SQL.

I'll find that I've used the '=' assignment operator in C# instead of the '==' equality operator, or used the '==' in SQL, which just uses '='.

Especially if I've been writing LINQ queries. They're frequently like upside-down SQL.
Was This Post Helpful? 0
  • +
  • -

#8 Brewer   User is offline

  • Awesome
  • member icon

Reputation: 182
  • View blog
  • Posts: 1,044
  • Joined: 14-June 10

Re: Mixing lanuages

Posted 20 April 2011 - 12:42 PM

This isn't a problem for me because I only know Java :)
Was This Post Helpful? 1
  • +
  • -

#9 Creecher   User is offline

  • I don't care
  • member icon

Reputation: 562
  • View blog
  • Posts: 2,049
  • Joined: 06-March 10

Re: Mixing lanuages

Posted 20 April 2011 - 05:47 PM

I find myself switching from C to C++ or vice versa quite often.


My debug console doesn't like it when I do that :P
Was This Post Helpful? 0
  • +
  • -

#10 marinus   User is offline

  • D.I.C Addict
  • member icon

Reputation: 138
  • View blog
  • Posts: 575
  • Joined: 14-April 10

Re: Mixing lanuages

Posted 21 April 2011 - 10:42 AM

I hate this , when writing C# everyday , then suddenly i need to fix some bug in vb6 .

And always i randomly put a semicolon in the back of the statement , like

Dim strName as String ;


And methods , don't even go there!!

Vb6 method.
Private Sub Done()


then using parentheses for method calling

Done()


its just crazy !

Also C# and C++ make me crazy

Only array declarations though

C++

char s [] = {'m','2'} ;


C#
char [] s = {'m' , '2'};



I always (everytime) put the 2 brackets in the wrong place in C# now .


And sometimes in Javascript ,

using int

for(int i  = 0 ; i < some.length; i++)


instead of using var

for(var i = 0 ; i < some.length; i++)


I always joke about this mindset .

It's total destruction.

This post has been edited by marinus: 21 April 2011 - 10:53 AM

Was This Post Helpful? 0
  • +
  • -

#11 ishkabible   User is offline

  • spelling expret
  • member icon





Reputation: 1747
  • View blog
  • Posts: 5,898
  • Joined: 03-August 09

Re: Mixing lanuages

Posted 21 April 2011 - 01:09 PM

i have this issue really bad when switching between Lua and C++. I'll stop putting semicolons at the end of statements in C++ and start putting parenthesis in if statements in Lua. also Boolean operators like !, !=, &&, || are all different in Lua. i tend to replace not, ~=, and, or with there C++ counterparts. also i always want to index Lua arrays starting at 0, i get so annoyed that Lua just had to be different about that.
Was This Post Helpful? 0
  • +
  • -

#12 TMKCodes   User is offline

  • D.I.C Regular
  • member icon

Reputation: 48
  • View blog
  • Posts: 440
  • Joined: 21-March 09

Re: Mixing lanuages

Posted 21 April 2011 - 01:17 PM

Barely have any problems switching between languages, though few times I have started to program new project in wrong language, but realized those mistakes before going too far. Though if I had gone too far with those mistakes I would have the programs in different language than I was supposed to write them in.
Was This Post Helpful? 0
  • +
  • -

#13 clskr   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 10-April 11

Re: Mixing lanuages

Posted 21 April 2011 - 02:39 PM

Hasn't happened to me a lot so far, but then i don't switch between languages that often.

This post has been edited by clskr: 21 April 2011 - 02:42 PM

Was This Post Helpful? 0
  • +
  • -

#14 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12657
  • View blog
  • Posts: 45,831
  • Joined: 27-December 08

Re: Mixing lanuages

Posted 21 April 2011 - 03:12 PM

When I first started with PHP, I would commonly forget datatypes and use the $ symbol in Java. Then when I'd start with PHP, I would want to say "You are an int, dammit! You will stay an int." Now that I've got a better handle on PHP, I don't have as much trouble, maybe save for naming conventions.
Was This Post Helpful? 0
  • +
  • -

#15 sas1ni69   User is offline

  • D.I.C Regular
  • member icon

Reputation: 86
  • View blog
  • Posts: 431
  • Joined: 04-December 08

Re: Mixing lanuages

Posted 21 April 2011 - 08:48 PM

I mix English up sometimes - :shuriken:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1