ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0008191Part 01: TTCN-3 Core LanguageNew Featurepublic12-01-2023 14:0926-01-2024 16:31
Matthias Simon 
Jens Grabowski 
normalminorhave not tried
assignedopen 
 
 
n/a
Nokia - Matthias Simon
0008191: Strict Rules
Stricter TTCN-3 language rules are beneficial for avoiding code smells. For example:

* 8094: Provide a canonical style for source code layout
* 8098: Mandatory module prefix for imported module definitions
* 8099: Disallow circular imports
* xxxx: Private as default visibility for module definitions
* xxxx: Disallow references in pattern strings
* xxxx: Explicit imports
* ...

Individual rules should be optional to assure backwards compatibility. Those rule could be configured by some kind of project manifest, or file-local by pragma directives. Examples from other languages:

* Perl: use strict;
* Python: from __future__ import nested_scopes
* Visual Basic: Option Strict On
* C#: #pragma warning disable 414, CS3021
No tags attached.
Issue History
12-01-2023 14:09Matthias SimonNew Issue
05-09-2023 10:50Jens GrabowskiNote Added: 0016521
05-09-2023 10:50Jens GrabowskiAssigned To => Jens Grabowski
05-09-2023 10:50Jens GrabowskiStatusnew => assigned
07-11-2023 13:40Jens GrabowskiNote Added: 0016535
26-01-2024 16:31Olivier GenoudNote Added: 0016615

Notes
(0016521)
Jens Grabowski   
05-09-2023 10:50   
TTF discussion: Interesting proposal. Recoomendations for TTCN-3 usage might be of interest for the future. List may be extended.
(0016535)
Jens Grabowski   
07-11-2023 13:40   
TTF discussion: Umbrella CR for new major release of TTCN-3.
(0016615)
Olivier Genoud   
26-01-2024 16:31   
- 8094: Core language shall not be mixed up with coding style guides and in general the coding style shall be project specific. Nevertheless, a configurable 'beautifier' tool could be helpful, e.g. to achieve a common indentation.
- 8098: The proposal is not backward compatible and would cause us to change everything (all function calls would need a module prefix)! In general naming conventions shall be project-specific with project specific tools checking them.
- 8099: There is no need to handle potential code smells at core language level, but projects may define what shall be considered as code smell and how to avoid these code smells (e.g. by appropriate tools).