<commit_before>```
title: "Code Style"
```

HaxeFlixel is following most of the key style found in the original Flixel AS3 library.
Over the most recent HaxeFlixel releases a large amount of the codebase has been modified to follow these style choices.
If you encounter code in the codebase that does not fall under these guidelines please submit a pull-request.

----

#### Functions

Capitalized letters for function parameters:

``` haxe
function translate( Words:String, Fish:BableFish ):Void
```

Instead of:

``` haxe
function translate( words:String, fish:BableFish ):Void
```

##### Simplify the function names:

```
function shootEnemy(Target:Enemy, Bullet:BulletType):Void
```

Easier to read than:

```
function shootAtASpecificEnemyWithABulletTypeOf(Target:Enemy, Bullet:BulletType):Void
```

----

####Curley Braces

Use line breaks in methods, operators etc where possible:

``` haxe
function createAwesome( Boring:Stuff, Creative:Things ):Void
{
	//code
}
```

Instead of:

``` haxe
function createAwesome( Boring:Stuff, Creative:Things ):Void {
	//code
}
```

If the logic is simple enough it is acceptable to omit using them completely:

``` haxe
function createAwesome():Bool
	return _surprise;
```

----

#### Local Variables

Use an underscore prefix for any private variable:

``` haxe
private var _awesome:Awesome;
```

Do not use a prefix for a public variable:

``` haxe
public var awesome:Awesome;
```

----

#### Strictly Type ambiguous variables

The Haxe compiler does not require you to declare the Type of a variable in some contexts however doing so improves the readability of the code:
<commit_msg>Update 08-code-style.html.md<commit_after>```
title: "Code Style"
```

HaxeFlixel is following most of the key style found in the original Flixel AS3 library.
Over the most recent HaxeFlixel releases a large amount of the codebase has been modified to follow these style choices.
If you encounter code in the codebase that does not fall under these guidelines please submit a pull-request.

----

#### Functions

Capitalized letters for function parameters:

``` haxe
function translate( Words:String, Fish:BableFish ):Void
```

Instead of:

``` haxe
function translate( words:String, fish:BableFish ):Void
```

##### Simplify the function names:

```
function shootEnemy(Target:Enemy, Bullet:BulletType):Void
```

Easier to read than:

```
function shootAtASpecificEnemyWithABulletTypeOf(Target:Enemy, Bullet:BulletType):Void
```

----

####Curley Braces

Use line breaks in methods, operators etc where possible:

``` haxe
function createAwesome( Boring:Stuff, Creative:Things ):Void
{
	//code
}
```

Instead of:

``` haxe
function createAwesome( Boring:Stuff, Creative:Things ):Void {
	//code
}
```

If the logic is simple enough it is acceptable to omit using them completely:

``` haxe
function createAwesome():Bool
	return _surprise;
```

----

#### Local Variables

Use an underscore prefix for any private variable:

``` haxe
private var _awesome:Awesome;
```

Do not use a prefix for a public variable:

``` haxe
public var awesome:Awesome;
```

##### Private and Public

Declare private members after public members where possible.
Public fields are more important than private members for people looking at the class for reference.

----

#### Strictly Type ambiguous variables

The Haxe compiler does not require you to declare the Type of a variable in some contexts however doing so improves the readability of the code:

{'fraction_non_alphanumeric': 0.10126947489901904, 'fraction_numerical': 0.001154068090017311, 'mean_word_length': 4.797658862876254, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '980247', 'n_tokens_mistral': 1087, 'n_tokens_neox': 995, 'n_words': 416}