LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Programming with 2 languanges.Guidance neede! (https://www.linuxquestions.org/questions/programming-9/programming-with-2-languanges-guidance-neede-4175545434/)

lolada6 06-15-2015 05:27 PM

Programming with 2 languanges.Guidance neede!
 
How to programm with 2 languanges which code simbols look alike.I mean is it possible to adjust part of a background on which we write code to specific languange.

ButterflyMelissa 06-15-2015 05:36 PM

LOL, welcome to the forum...
TWO languages???? You're not even trying...hehe
Okay, nuf giggles.
There is not really a good way to do that. I inter use PHP and JavaScript, sometimes even Java...trust me, JavaScript says:

Code:

var someName
and PHP, it's just

Code:

$someName
so, try a debug on a PHP module, that is called from client-side AJAX, confusion waiting to happen...
I use one tool: discipline...that and a debug stategy...errors will light up the room...soon enuff :)

Just...me :)
Thor

dugan 06-15-2015 07:55 PM

You mean: how do you get your mind into the state where it's ready to work with two programming languages at the same time? There's really no explanation more complicated than "know and be experienced with both languages".

My wine_env project is a relatively simple one that uses two languages: BASH and Python.

sundialsvcs 06-16-2015 07:53 AM

The question (which might be posted by a non-English speaker ...?) could also refer to the practice of writing a single application in more than one source-language at a time. For instance, a gcc program which calls a gfortran subroutine.

This works, because the object-code file format produced by both systems is compatible. The linker and loader components know how to process these files no matter what source language(s) were used to create them.

Care must be taken that the runtime environments of the two "strange bedfellows" are also compatible. For instance, you couldn't hand a "C++ object" to a FORTRAN subroutine and expect FORTRAN to know what to do with it. You might have to consider that some languages store array values "row-wise," others "column-wise," and so on. You must take care not to "muck-up the stack," which would bring the whole contrivance crashing down. But otherwise, yes, it works.


All times are GMT -5. The time now is 04:01 PM.