Programming Accents

I didn't realize they existed until now...

  • (2 Pages)
  • +
  • 1
  • 2

22 Replies - 5296 Views - Last Post: 22 January 2010 - 09:44 PM

#1 NickDMax   User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2255
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Programming Accents

Post icon  Posted 11 January 2010 - 01:08 PM

So I am beginning a tutorial on Functional programming but I am not truly a functional programmer. Off hand I typed that my functional programs have a procedural accent. That comment made me pause... for I have also noted that I program Java with a C/C++ accent... I definitely program C++ with a C accent (any C++ guru can easily tell I learned C before I learned C++). While I think it is mostly gone, I bet there is still a touch of a QBasic accent (especially when I program VB).

AS we learn a language we often learn idiom-like habits (of course a computer language can't actually have idioms -- that is impossible) that tend to stick with us, and once our mind knows how to solve a problem, it will try to re-use the solution were it can... and so those little habits surface into other languages as we program in them.

The reason I open this topic in the computer science forum is that I think that there might be room for some interesting research here: Can we quantify what a C accent looks like in Java? Or a procedural accent in a functional language?

I suppose the first question would be: does this phenomena really exist or am I just smoking crack. My instincts tell me that it definitely does, but one would need to find evidence of it.

I think that this could be valuable and interesting research. In C++ template-meta programming is a functional paradigm -- it was "discovered" and was never meant to exist -- it is "out of paradigm" and very hard for classically-trained procedural programmers to really "get" -- a fact demonstrated by how long it took to be discovered despite the prevalence of template programming itself.

The same kind of phenomena existed in Javascript -- even though the inventor Javascript intentionally put in its functional aspects, for a long time (and arguable still continuing today) most Javascript developers were unaware of the functional aspects -- even if they used them here or there!

So I wonder at the psychology of programming language paradigm shifts... and programming language accents.

Is This A Good Question/Topic? 1
  • +

Replies To: Programming Accents

#2 ellisgl   User is offline

  • D.I.C Head
  • member icon

Reputation: 9
  • View blog
  • Posts: 161
  • Joined: 10-November 07

Re: Programming Accents

Posted 11 January 2010 - 01:12 PM

Insert joke about LISP..
Was This Post Helpful? 0
  • +
  • -

#3 Vermiculus   User is offline

  • D.I.C Regular
  • member icon

Reputation: 10
  • View blog
  • Posts: 314
  • Joined: 26-February 09

Re: Programming Accents

Posted 11 January 2010 - 01:29 PM

View Postellisgl, on 11 Jan, 2010 - 12:12 PM, said:

Insert joke about LISP..

hahahahaha
very very very good one xD

I'd like to think I have a slight English accent...
like British
Was This Post Helpful? 0
  • +
  • -

#4 KYA   User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3213
  • View blog
  • Posts: 19,241
  • Joined: 14-September 07

Re: Programming Accents

Posted 11 January 2010 - 01:31 PM

I think this transcends languages more often then naught. For example, you can tell when someone is on an OOP or functional programming kick.


Paradigm over language quirks.

This post has been edited by KYA: 11 January 2010 - 01:31 PM

Was This Post Helpful? 0
  • +
  • -

#5 ellisgl   User is offline

  • D.I.C Head
  • member icon

Reputation: 9
  • View blog
  • Posts: 161
  • Joined: 10-November 07

Re: Programming Accents

Posted 11 January 2010 - 01:36 PM

View PostKYA, on 11 Jan, 2010 - 12:31 PM, said:

I think this transcends languages more often then naught. For example, you can tell when someone is on an OOP or functional programming kick.


Paradigm over language quirks.

When you are talking about functional programing, do you mean procedural programing?
Was This Post Helpful? 0
  • +
  • -

#6 KYA   User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3213
  • View blog
  • Posts: 19,241
  • Joined: 14-September 07

Re: Programming Accents

Posted 11 January 2010 - 01:38 PM

No, I mean functional, as in functional programming languages. The mindset when you're working in that realm is different then in procedural or OOP geared languages.

For example, Lua has closures, but you could work in it without utilizing that feature. Looking at some code you can tell what the mindset was of the person who wrote it.
Was This Post Helpful? 0
  • +
  • -

#7 Smurphy   User is offline

  • D.I.C Regular
  • member icon

Reputation: 35
  • View blog
  • Posts: 367
  • Joined: 07-July 08

Re: Programming Accents

Posted 11 January 2010 - 01:40 PM

I guess I would have to agree. My first language was C# but the first language I really studied and learned was C. I catch myself all the time typing functions in a spot then going wow that should just be in a class. So compared to a true OOP programmer you can see that I did not start out with OOP.
Was This Post Helpful? 0
  • +
  • -

#8 ellisgl   User is offline

  • D.I.C Head
  • member icon

Reputation: 9
  • View blog
  • Posts: 161
  • Joined: 10-November 07

Re: Programming Accents

Posted 11 January 2010 - 01:44 PM

View PostKYA, on 11 Jan, 2010 - 12:38 PM, said:

No, I mean functional, as in functional programming languages. The mindset when you're working in that realm is different then in procedural or OOP geared languages.

For example, Lua has closures, but you could work in it without utilizing that feature. Looking at some code you can tell what the mindset was of the person who wrote it.

Ah just making sure.. I've seen people say functional when they meant procedural. Good old closures. =)

I started out with BASIC on a Timex Sinclair 1000. Then Different BASIC types here and there, did some VB back in VB 3 days, did PERL, SOME ASM, Some C/C++, PHP and SQL. Of course I probably have an accent of an english man that lived in new york listening to creole and trying to speak like a person from Fargo trying to imitate a deep southern accent. =)
Was This Post Helpful? 0
  • +
  • -

#9 SixOfEleven   User is offline

  • Planeswalker
  • member icon

Reputation: 1055
  • View blog
  • Posts: 6,643
  • Joined: 18-October 08

Re: Programming Accents

Posted 11 January 2010 - 01:46 PM

View Postellisgl, on 11 Jan, 2010 - 03:36 PM, said:

View PostKYA, on 11 Jan, 2010 - 12:31 PM, said:

I think this transcends languages more often then naught. For example, you can tell when someone is on an OOP or functional programming kick.


Paradigm over language quirks.

When you are talking about functional programing, do you mean procedural programing?


No, functional programming is a language style different from procedural languages like C. Functional programming languages that I can think of off the top of my head are: Lisp, Scheme, and Haskel. They are a bit different from the C-style languages. Check out the functional programming forum here: http://www.dreaminco...howforum111.htm

I have a bad Pascal accent when I program. It was what I would call the first procedural language that I picked up. I wouldn't call BASIC or COBOL truly procedural like C-style languages. All of the begins and end from Pascal have me placing curly brackets on lines of their own. I sometimes also use Pascal case for variables, the first letter capitalize and all of the letters of other words capitalized.

You can also tell I learned C before C++.
Was This Post Helpful? 0
  • +
  • -

#10 erik.price   User is offline

  • D.I.C Lover
  • member icon

Reputation: 486
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: Programming Accents

Posted 11 January 2010 - 01:52 PM

Most of the programs I write in Ruby tend to be influenced heavily by Java (mainly because that's what I've been using most for the past couple of months).

The code is still correct, but I bet lots of people who have more Ruby experience than I do wouldn't really appreciate the lack of Rubyness in the code.
Was This Post Helpful? 0
  • +
  • -

#11 Smurphy   User is offline

  • D.I.C Regular
  • member icon

Reputation: 35
  • View blog
  • Posts: 367
  • Joined: 07-July 08

Re: Programming Accents

Posted 11 January 2010 - 01:54 PM

Quote

I sometimes also use Pascal case for variables, the first letter capitalize and all of the letters of other words capitalized.


I never programmed Pascal, and I do not know where I picked that up, most often than not my variables are pascal case. :)
It is kind of like a spoken language sometimes you never know where you pick up habits. ;)

This post has been edited by Smurphy: 11 January 2010 - 01:56 PM

Was This Post Helpful? 0
  • +
  • -

#12 Dogstopper   User is offline

  • The Ninjaducky
  • member icon

Reputation: 2975
  • View blog
  • Posts: 11,224
  • Joined: 15-July 08

Re: Programming Accents

Posted 11 January 2010 - 02:17 PM

When I program Python, I find myself using Java-based thinking, such as when I could be using list comprehensions, I often find myself using loops

This is list comprehension:
>>> list = [1,3,5,4,8,9]
>>> for x in list:
	print x



That is better Python than the following, which i picked up using Java/C++/C coding:

>>> for x in range(len(list)):
	print list[x]



The difference is subtle, and the first is definitely more "Pythonic", however, I do find myself leaning toward the latter due to my accent.
Was This Post Helpful? 0
  • +
  • -

#13 Shane Hudson   User is offline

  • D.I.C Technophile
  • member icon

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

Re: Programming Accents

Posted 11 January 2010 - 02:31 PM

I do not actually take Computer Science yet so I may be talking about something different.. but my first language was VB6 (possibly 5, cannot quite remember) and I still write, be it Java or C# or VB.NET, using very little classes and using some methods as if they were procedures.
Was This Post Helpful? 0
  • +
  • -

#14 NickDMax   User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2255
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Programming Accents

Posted 11 January 2010 - 03:00 PM

View Postellisgl, on 11 Jan, 2010 - 03:12 PM, said:

Insert joke about LISP..

AH that was not a LQTM but a real LOL -- I am embarrassed that I did not even make the connection. There is room for a pretty high pun score there (pun score is calculated by how many different levels of meaning a pun might have... your typical pun has a pun score of 2 and a really cleaver conversational one might have 3-4... in abstract discussions one often finds very high pun scores and I have even seen mathematical induction proofs for claims of infinite pun scores... anyway... way off topic now).

@KYA -- yes the accent of function to procedural and visa versa is more pronounced.

For example you can see the scar of my mathematica days in my predilection for the ternary operator in C/C++/Java -- a very out-of-paradigm construct if there ever was one!
Was This Post Helpful? 0
  • +
  • -

#15 dorknexus   User is offline

  • or something bad...real bad.
  • member icon

Reputation: 1272
  • View blog
  • Posts: 4,625
  • Joined: 02-May 04

Re: Programming Accents

Posted 11 January 2010 - 04:56 PM

list = [1,3,5,4,8,9]
>>> for x in list:
	print x


that is not actually list comprehension. this is however:

list = [1,2,3,4,5,6,7,8]
new_list = [2**n for n in list]


Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2