Title: Module system · Issue #37 · rowscript/rowscript · GitHub
Open Graph Title: Module system · Issue #37 · rowscript/rowscript
X Title: Module system · Issue #37 · rowscript/rowscript
Description: I prefer Go's package system where all source files in the same directory belong to the same Go package if it's written so (e.g. package main as their file headers), because: It's highly flexible to extend the functionalities without mod...
Open Graph Description: I prefer Go's package system where all source files in the same directory belong to the same Go package if it's written so (e.g. package main as their file headers), because: It's highly flexible t...
X Description: I prefer Go's package system where all source files in the same directory belong to the same Go package if it's written so (e.g. package main as their file headers), because: It's highl...
Opengraph URL: https://github.com/rowscript/rowscript/issues/37
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Module system","articleBody":"I prefer **Go's package system** where all source files in the same directory belong to the same Go package if it's written so (e.g. `package main` as their file headers), because:\r\n\r\n* It's highly flexible to extend the functionalities **without modifying any files**, because you could add new definitions in those new files, and they would be exported for free. But in Rust (and similarly in Python), you need to add `mod xxx` in the `mod.rs` file which might make you indecisive about the line you need to place the statement lol.\r\n\r\nIn a RowScript codebase, JavaScript files (e.g. `*.js`) inside a directory (i.e. module) would be copied and imported into the generated JS module, that's paired with the magic of postulates (#40).\r\n\r\nHowever, by adopting Go's package system, the terminologies should be changed according to JavaScript's conventions:\r\n\r\n|Concept|In Go|In RowScript|\r\n|:--:|:--:|:--:|\r\n|A directory|Package|Module (due to ES6 modules)|\r\n|A codebase, repository|Module|Package (due to npm packages)|","author":{"url":"https://github.com/anqur","@type":"Person","name":"anqur"},"datePublished":"2023-04-13T03:02:35Z","url":"https://github.com/rowscript/rowscript/issues/37"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:93e47b5b-6ac3-a1db-bb71-ab0a51636ab3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB32:F0723:1A0F796:22C53CB:6AFA13A2 |
| html-safe-nonce | 71846ff0ed0640cf75d6009f024dd0c88cc6b11fdfe3cfe70639da5e7ff94587 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjMyOkYwNzIzOjFBMEY3OTY6MjJDNTNDQjo2QUZBMTNBMiIsInZpc2l0b3JfaWQiOiI5NTg1NDUyNTgxMTMyNzQ3ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6d4f6494816580d58b571fde52c0e78621cd2dfc3a3a98da6428f4db4f0489fe |
| hovercard-subject-tag | issue:1665604144 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rowscript/rowscript/37/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a6448b58590b6d471f2db2cb96f0ca1ffb3f8d8d5c23f501502a4c2aa0280747/rowscript/rowscript/issues/37 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a6448b58590b6d471f2db2cb96f0ca1ffb3f8d8d5c23f501502a4c2aa0280747/rowscript/rowscript/issues/37 |
| og:image:alt | I prefer Go's package system where all source files in the same directory belong to the same Go package if it's written so (e.g. package main as their file headers), because: It's highly flexible t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anqur |
| hostname | github.com |
| expected-hostname | github.com |
| None | 612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7 |
| turbo-cache-control | no-preview |
| go-import | github.com/rowscript/rowscript git https://github.com/rowscript/rowscript.git |
| octolytics-dimension-user_id | 87884599 |
| octolytics-dimension-user_login | rowscript |
| octolytics-dimension-repository_id | 388972006 |
| octolytics-dimension-repository_nwo | rowscript/rowscript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 388972006 |
| octolytics-dimension-repository_network_root_nwo | rowscript/rowscript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 072e34035c13c31543fba9f025cbbbda4210dae4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width