3 ms·
These are rather unusual definitions. Where I come from, porting to a new platform would mean rewriting platform-specific parts of the app, not coming up with a
by oriolid 4y ago
These are rather unusual definitions. Where I come from, porting to a new platform would mean rewriting platform-specific parts of the app, not coming up with a compiler that magically supports both targets. The choice between forking and refactoring the app into shared and platform-specific modules depends on many factors. Though I'd really like to see a compiler, not wrapper library, that supports both Apple's Core Whatever and your choice of Linux libraries.
On extreme end, porting something from let's say Commodore 64 to Spectrum ZX would be more a complete rewrite.
I also don't really understand the point of this project. Since it's compiled from C, it doesn't get any of possible benefits of using a language that is not C.
- randomdata 4y ago> porting to a new platform would mean rewriting platform-specific parts of the app That may be part of the process, sure. The formal definition isn't clear on exactly what process is necessary to target a new environment, just that some action is necessary. Introducing a new compiler is one possible action to achieve the result. However, when you do have to modify the code like you suggest, typically you are adding the environment specific aspects in #ifdef-type directives, so you're still not introducing a new codebase to maintain. It's still the same codebase that will be maintained just as it always way. And even if you want to split hairs, no matter how you slice it there is no implication that the product of the port is what you will maintain. I still have no idea where that is coming from. > I also don't really understand the point of this project. To avoid cgo when using the library, I'm sure. Isn't that the point of a lot of cznic/modernc.org's projects?
- oriolid 4y ago> The formal definition isn't clear on exactly what process is necessary to target a new environment I'm interested in the source of this "formal definition", because it doesn't really match anything I have come across over the years. > typically you are adding the environment specific aspects in #ifdef-type directives Not really, more like writing platform-specific parts as separate modules. Of course you can write Java for Android and Objective C for iOS in the same file if you really want, but it doesn't make much sense. Or even write a compiler that takes a source file with target-specific paths and transpiles to Java and Objective C if you want to go all in. I've never seen anyone do that.
- randomdata 4y ago> I'm interested in the source of this "formal definition", because it doesn't really match anything I have come across over the years. "In software engineering, porting is the process of adapting software for the purpose of achieving some form of execution in a computing environment that is different from the one that a given program (meant for such execution) was originally designed for (e.g., different CPU, operating system, or third party library)." Here we have software (Tcl) that was adapted to work in a computing environment (Go) that is different than the given program was originally designed for. This doesn't seem very controversial. > Of course you can write Java for Android and Objective C for iOS in the same file if you really want, but it doesn't make much sense. If you are changing the language software is written in, it is a stretch to call that porting. That isn't even a fork. That is a new project.
- oriolid 4y agoIt make it sound a lot like you think that "porting" means what the rest of the world calls compiling and have no idea what porting is.
- randomdata 4y agoWe certainly aren't talking about compiling. Compilation is repeatable. A port is done once.
- oriolid 4y agoCompiling can also be done once and the object files can be published on Github if you for some reason want to do that. As far as I understand, this "port" is transpiled from C source and the Go source files are compiler artifacts just like object files.
- randomdata 4y agoCompiling is repeatable, however. Porting is done once.